From 4bea7d5baeb00f55781e01d2f32688d76c15206d Mon Sep 17 00:00:00 2001 From: YuHyun Date: Thu, 18 Jan 2024 18:26:11 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20QuizCoachmark=20>=20=ED=8A=9C=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=EC=96=BC=20=EB=8B=AB=EA=B8=B0=20=EC=8B=9C=20=EC=A2=85?= =?UTF-8?q?=EB=A3=8C=EB=A1=9C=20=ED=8C=90=EB=8B=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#304] --- .../src/components/quiz/QuizCoachmark/QuizCoachmark.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx b/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx index bdf7101..9bcc8ae 100644 --- a/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx +++ b/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx @@ -1,4 +1,4 @@ -import { EVENTS } from "react-joyride"; +import { ACTIONS, EVENTS } from "react-joyride"; import { Coachmark, type CoachmarkProps } from "../../coachmark"; @@ -10,13 +10,14 @@ export function QuizCoachmark({ onTourEnd }: QuizCoachmarkProps) { const handleProgress: CoachmarkProps["callback"] = ({ index: stepIndex, type, + action, }) => { if (stepIndex === HEARDER_OVERLAP_STEP && type === EVENTS.TOOLTIP) { window?.scroll(0, 0); return; } - if (type === EVENTS.TOUR_END) { + if (type === EVENTS.TOUR_END || action === ACTIONS.CLOSE) { onTourEnd(); } };