11import { useEffect } from "react" ;
2-
32import confetti from "canvas-confetti" ;
43import type { Options as ConfettiOptions } from "canvas-confetti" ;
54
65import Toast from "../ui/Toast/Toast" ;
7-
86import HomeNavigateConfirmModal from "@/components/HomeNavigateConfirmModal/HomeNavigateConfirmModal" ;
97import styles from "@/components/ReviewResult/ReviewResult.module.scss" ;
108import Button from "@/components/ui/Button/Button" ;
@@ -16,9 +14,13 @@ import useToast from "@/hooks/common/useToast";
1614
1715const ReviewResult = ( ) => {
1816 const { isOpen, handleClose, handleOpen } = useOverlay ( ) ;
19- const { isToast, showToast } = useToast ( 1000 ) ; // 1초 후 사라짐
17+ const { isToast, showToast } = useToast ( 1000 ) ;
18+
19+ const reviewText = `오늘 처음으로 청담커피 앤 토스트에서 주문했어요.. 매장도 깔끔하고 직원들도 친절해요!
20+ 음료랑 토스트 세트 시켰는데 가성비가 좋네요… 맛도 좋고 양도 많아요!! 다음에도 또 시켜먹을 거예요.` ;
2021
2122 const handleCopy = ( ) => {
23+ navigator . clipboard . writeText ( reviewText ) ;
2224 showToast ( ) ;
2325 } ;
2426
@@ -31,9 +33,7 @@ const ReviewResult = () => {
3133 ticks : 50 ,
3234 } ;
3335
34- confetti ( {
35- ...setting ,
36- } ) ;
36+ confetti ( setting ) ;
3737 } ;
3838
3939 useEffect ( ( ) => {
@@ -53,9 +53,7 @@ const ReviewResult = () => {
5353 </ div >
5454
5555 < Text variant = "bodyLg" color = "primary" >
56- 오늘 처음으로 청담커피 앤 토스트에서 주문했어요.. 매장도 깔끔하고 직원들도 친절해요!
57- 음료랑 토스트 세트 시켰는데 가성비가 좋네요… 맛도 좋고 양도 많아요!! 다음에도 또 시켜먹을
58- 거예요.
56+ { reviewText }
5957 </ Text >
6058 < div className = { styles . IconBtn } >
6159 < IconButton text = "복사하기" iconName = "paste" size = "sm" onClick = { handleCopy } />
0 commit comments