Open
Conversation
|
@Eugene-A-01 is attempting to deploy a commit to the Eujin Ahn's projects Team on Vercel. A member of the Team first needs to authorize it. |
seoyoung-min
approved these changes
Mar 3, 2025
Comment on lines
+27
to
+57
| useEffect(() => { | ||
| const timer = setTimeout(() => { | ||
| if (captureRef.current) { | ||
| const clonedCapture = captureRef.current.cloneNode(true) as HTMLDivElement; | ||
| clonedCapture.style.width = `${window.innerWidth}px`; | ||
| clonedCapture.style.height = `${window.innerHeight}px`; | ||
| clonedCapture.style.padding = '50px 30px'; | ||
|
|
||
| document.body.appendChild(clonedCapture); | ||
|
|
||
| toPng(clonedCapture, { backgroundColor: '#fff' }) | ||
| .then((dataUrl) => { | ||
| const link = document.createElement('a'); | ||
| link.download = `listywave_${data.title}.png`; | ||
| link.href = dataUrl; | ||
| link.click(); | ||
| toasting({ type: 'success', txt: '이미지를 저장하였습니다' }); | ||
| }) | ||
| .catch((err) => { | ||
| console.error('이미지 저장 오류:', err); | ||
| toasting({ type: 'error', txt: '이미지 저장을 실패했습니다.' }); | ||
| }) | ||
| .finally(() => { | ||
| document.body.removeChild(clonedCapture); | ||
| onClose(); | ||
| }); | ||
| } | ||
| }, 1000); | ||
|
|
||
| return () => clearTimeout(timer); | ||
| }, [data.title, onClose]); |
Contributor
There was a problem hiding this comment.
모달로 띄워지고 자동으로 닫히고 저장까지 너무 완벽하게 구현해주셔서 놀랐어요!!🥹 ver2때 만들어 둔 디자인은 있는데 ver3용은 없네요ㅠ, ver3에 맞게 어떻게 바꿀 수 있을지 고민해보겠습니다!!
Contributor
b7824a5 to
b3265a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

개요
작업 사항
스크린샷
2025-03-03.6.59.45.mov
리뷰어에게