feat: init coursechapter + elements interface

This commit is contained in:
swve 2022-10-22 23:03:36 +02:00
parent f492baf276
commit 19b7dd650e
16 changed files with 542 additions and 75 deletions

View file

@ -34,11 +34,15 @@ const AuthProvider = (props: any) => {
}
}
// TODO(mvp) : fix performance issues > no need to check auth on every render
useEffect(() => {
if (!auth.isAuthenticated) {
if (auth.isLoading) {
checkAuth();
}
return () => {
auth.isLoading = false;
}
}, []);
return <AuthContext.Provider value={auth}>{props.children}</AuthContext.Provider>;