From 491c612964825f324e7fced21d82cb1510799293 Mon Sep 17 00:00:00 2001 From: Minh Nguyen <64875104+MinhxNguyen7@users.noreply.github.com> Date: Fri, 26 Jan 2024 08:33:09 +0000 Subject: [PATCH] Switch to search on tour restart --- apps/antalmanac/src/components/Tutorial.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/antalmanac/src/components/Tutorial.tsx b/apps/antalmanac/src/components/Tutorial.tsx index 6093cf62c..cd41c8550 100644 --- a/apps/antalmanac/src/components/Tutorial.tsx +++ b/apps/antalmanac/src/components/Tutorial.tsx @@ -5,12 +5,19 @@ import { useTour } from '@reactour/tour'; import { useEffect, useMemo } from 'react'; import { stepsFactory, tourShouldRun } from '$lib/TutorialHelpers'; +import useCoursePaneStore from '$stores/CoursePaneStore'; export function Tutorial() { const { setCurrentStep, setIsOpen, setSteps } = useTour(); + const [displaySearch, disableManualSearch] = useCoursePaneStore((state) => [ + state.displaySearch, + state.disableManualSearch, + ]); const restartTour = useMemo( () => () => { + displaySearch(); + disableManualSearch(); setCurrentStep(0); setIsOpen(true); },