Fix the bug at the first opening of the theme page with an active activity.

This commit is contained in:
Hikmet 2024-03-26 20:39:10 +03:00
parent 8c9e338f51
commit 6fd59c712b

View File

@ -61,6 +61,7 @@ export function useBaseViewModel(theme: ITheme): BaseViewModel {
if (activityId === null) {
delete query["alistirma"];
} else {
query["ders"] = ((activeLesson as number) + 1).toString();
query["alistirma"] = activityId;
}
@ -92,7 +93,7 @@ export function useBaseViewModel(theme: ITheme): BaseViewModel {
openActivity(activeActivityId, activity);
}
}
}, []);
}, [router.isReady]);
const getLocalExerciseDatas = () => {
if (activeLesson === null) return;