Merge pull request #31372 from overleaf/mj-tutorial-cleanup

[web] Stop manually checking inactiveTutorials

GitOrigin-RevId: c2d14d8633ff58c1dc0b0544c890090d8beb64e2
This commit is contained in:
Mathias Jakobsen
2026-02-16 09:06:15 +00:00
committed by Copybot
parent d8d74ae45c
commit 08f2597948
10 changed files with 206 additions and 48 deletions
@@ -21,8 +21,17 @@ const useTutorial = (
) => {
const [showPopup, setShowPopup] = useState(false)
const { deactivateTutorial, currentPopup, setCurrentPopup } =
useTutorialContext()
const {
deactivateTutorial,
currentPopup,
setCurrentPopup,
inactiveTutorials,
} = useTutorialContext()
const checkCompletion = useCallback(
() => inactiveTutorials.includes(tutorialKey),
[inactiveTutorials, tutorialKey]
)
const completeTutorial = useCallback(
async (
@@ -113,6 +122,7 @@ const useTutorial = (
clearAndShow,
showPopup,
hideUntilReload,
checkCompletion,
}
}