diff --git a/src/pages/Share/Share.jsx b/src/pages/Share/Share.jsx index 152bd7fb..a2dfdc36 100644 --- a/src/pages/Share/Share.jsx +++ b/src/pages/Share/Share.jsx @@ -9,24 +9,11 @@ import ClearStarPIcon2 from "@/assets/starclearPicon2.svg"; const SharePage = ({ onBack }) => { const captureRef = useRef(); - const { starP } = useMoveonStarP(); - const [isButtonVisible, setIsButtonVisible] = useState(true); - - useEffect(() => { - setIsButtonVisible(true); - }, []); const handleCapture = async () => { - setIsButtonVisible(false); - - try { - const canvas = await html2canvas(captureRef.current); - await captureScreenshot(canvas); - } catch (err) { - console.log("캡처 중 오류가 발생했습니다."); - } finally { - setIsButtonVisible(true); - } + const canvas = await html2canvas(captureRef.current); + await captureScreenshot(canvas); }; + const starData = starP && starP.data ? starP.data : null; if (!starData) { return

데이터를 불러오는 중입니다...

; // theme이 null인 경우 처리 @@ -59,19 +46,17 @@ const SharePage = ({ onBack }) => {
- {isButtonVisible && ( - - -
- 이미지 저장하고 공유하기 - -
-
- -
- )} + + +
+ 이미지 저장하고 공유하기 + +
+
+ +
diff --git a/src/pages/Share/styled.js b/src/pages/Share/styled.js index 3e0e7100..a3c08110 100644 --- a/src/pages/Share/styled.js +++ b/src/pages/Share/styled.js @@ -94,8 +94,8 @@ export const ClearMain = styled.div` } .textOverlay { position: absolute; - top: 54%; - left: 49%; + top: 50%; + left: 50%; z-index: 5; font-weight: bold; text-align: center; diff --git a/src/router.jsx b/src/router.jsx index d7504cd1..904716c0 100644 --- a/src/router.jsx +++ b/src/router.jsx @@ -18,6 +18,7 @@ import { SearchResultP } from "./pages/SearchPage/SearchResultP"; import { Test } from "./pages/TestPage/Test"; import { NotFound } from "./pages/NotFound/NotFount"; import { AgreePage } from "./pages/AgreePage/AgreePage"; +import SharePage from "@/pages/Share/Share"; const router = createBrowserRouter([ { path: "/",