diff --git a/src/components/HelpModal.tsx b/src/components/HelpModal.tsx index 3817077..bdbb833 100644 --- a/src/components/HelpModal.tsx +++ b/src/components/HelpModal.tsx @@ -11,7 +11,7 @@ import { Tabs, } from '@nextui-org/react'; import { AnimatePresence, motion } from 'framer-motion'; -import { useState } from 'react'; +import { useEffect, useState } from 'react'; import { useHelpModal } from '../helpers/help-modal'; @@ -85,6 +85,13 @@ export const HelpModal = () => { }), }; + useEffect(() => { + if (!helpModal.isOpen) { + setStepIndex(0); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [helpModal.isOpen]); + const step = STEPS[stepIndex]; return (