From 0189385862f8e5e7e2c60d023798c7fb58e17ef4 Mon Sep 17 00:00:00 2001 From: chaem03 Date: Tue, 6 Aug 2024 18:58:20 +0900 Subject: [PATCH] Test --- src/pages/Share/Share.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pages/Share/Share.jsx b/src/pages/Share/Share.jsx index 980589fd..448ee7c6 100644 --- a/src/pages/Share/Share.jsx +++ b/src/pages/Share/Share.jsx @@ -8,7 +8,6 @@ import ClearStarPIcon1 from "@/assets/starclearPicon1.svg"; import ClearStarPIcon2 from "@/assets/starclearPicon2.svg"; import blur from "@/assets/blur.svg"; import { useParams } from "react-router-dom"; - import { Loading } from "../Loading/Loading"; const SharePage = ({ onBack }) => { @@ -34,12 +33,13 @@ const SharePage = ({ onBack }) => { }, []); const handleCapture = async () => { + console.log("capture check1"); setIsButtonVisible(false); - setTimeout(async () => { - const canvas = await html2canvas(captureRef.current, { useCORS: true }); - await captureScreenshot(canvas); - setIsButtonVisible(true); - }, 100); + const canvas = await html2canvas(captureRef.current, { useCORS: true }); + console.log("capture check2"); + const data = await captureScreenshot(canvas); + console.log(data); + setIsButtonVisible(true); }; const starData = starP && starP.data ? starP.data : null;