From b2e2b1a91be2cc74ce2311ac453c19eec76b6c28 Mon Sep 17 00:00:00 2001 From: kiyeong Date: Tue, 26 Nov 2024 02:33:12 +0900 Subject: [PATCH] =?UTF-8?q?feat:=EB=84=B7=ED=94=8C=EB=A6=AD=EC=8A=A4?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99=20=EB=88=84=EB=A5=B4=EA=B3=A0=20?= =?UTF-8?q?1=EC=B4=88=20=EB=92=A4=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Main/components/DetailModal.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Main/components/DetailModal.tsx b/src/Main/components/DetailModal.tsx index 43960a4..b157eb9 100644 --- a/src/Main/components/DetailModal.tsx +++ b/src/Main/components/DetailModal.tsx @@ -80,7 +80,7 @@ const DetailModal = ({ isOpen, onClose, content }: DetailModalProps) => { try { await api.post(`/api/watch/${content.id}`); toast({ - duration: 3000, + duration: 1500, isClosable: true, position: "top", render: () => ( @@ -97,14 +97,16 @@ const DetailModal = ({ isOpen, onClose, content }: DetailModalProps) => { ), }); + // 1초 뒤에 페이지 이동 + setTimeout(() => { + window.open( + "https://www.netflix.com/kr/", + "_blank", + "noopener,noreferrer" + ); + }, 1000); } catch (error) { console.error("시청 기록 저장 요청 중 오류 발생:", error); - } finally { - window.open( - "https://www.netflix.com/kr/", - "_blank", - "noopener,noreferrer" - ); } };