feat: Implement student notes functionality for lessons, including API endpoints, database schema, and frontend UI.

This commit is contained in:
2026-02-16 02:13:50 -03:00
parent 82b346294c
commit 3ae1ae6fd6
11 changed files with 302 additions and 18 deletions
+4 -2
View File
@@ -12,7 +12,8 @@ export default function AuthGuard({ children }: { children: React.ReactNode }) {
useEffect(() => {
if (!loading) {
const isAuthPage = pathname?.startsWith("/auth");
if (!user && !isAuthPage) {
const isCatalogRoot = pathname === "/";
if (!user && !isAuthPage && !isCatalogRoot) {
router.push("/auth/login");
} else if (user && isAuthPage) {
router.push("/");
@@ -29,7 +30,8 @@ export default function AuthGuard({ children }: { children: React.ReactNode }) {
}
const isAuthPage = pathname?.startsWith("/auth");
if (!user && !isAuthPage) {
const isCatalogRoot = pathname === "/";
if (!user && !isAuthPage && !isCatalogRoot) {
return null;
}