mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #31372 from overleaf/mj-tutorial-cleanup
[web] Stop manually checking inactiveTutorials GitOrigin-RevId: c2d14d8633ff58c1dc0b0544c890090d8beb64e2
This commit is contained in:
committed by
Copybot
parent
d8d74ae45c
commit
08f2597948
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user