Skip to content

Commit

Permalink
Merge pull request #501 from LikeLion-at-DGU/dev
Browse files Browse the repository at this point in the history
🚀 Deploy
  • Loading branch information
Chaem03 authored Aug 6, 2024
2 parents c2ee3a7 + 8e7cf5c commit 8b0bc6e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/pages/Share/Share.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@ const SharePage = () => {

const handleCapture = async () => {
setIsButtonVisible(false);
try {
const canvas = await html2canvas(captureRef.current, { useCORS: true });
await captureScreenshot(canvas);
} catch (error) {
} finally {
setIsButtonVisible(true);
}
setTimeout(async () => {
try {
const canvas = await html2canvas(captureRef.current, { useCORS: true });
await captureScreenshot(canvas);
} catch (error) {
console.error("Error capturing the screenshot:", error);
} finally {
setIsButtonVisible(true);
}
}, 100);
};

const starData = starP && starP.data ? starP.data : null;
Expand Down

0 comments on commit 8b0bc6e

Please sign in to comment.