From 501de0103f01aeedc243d3655ea3de6f40a30351 Mon Sep 17 00:00:00 2001 From: AD2025 Date: Thu, 13 Nov 2025 23:24:44 +0200 Subject: [PATCH] fix route error --- .gitignore | 28 +++++++++++++++++++ frontend/src/app/app.routes.ts | 7 +++++ frontend/src/app/features/auth/login/login.ts | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f9524c --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Node modules +node_modules/ + +# Environment files +.env +.env.local +.env.*.local + +# Logs +logs/ +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Coverage +coverage/ + +# OS files +.DS_Store +Thumbs.db + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ diff --git a/frontend/src/app/app.routes.ts b/frontend/src/app/app.routes.ts index 5529b88..71501c2 100644 --- a/frontend/src/app/app.routes.ts +++ b/frontend/src/app/app.routes.ts @@ -16,6 +16,13 @@ export const routes: Routes = [ title: 'Register - Quiz Platform' }, + // Guest routes + { + path: 'guest-welcome', + loadComponent: () => import('./shared/components/guest-welcome/guest-welcome').then(m => m.GuestWelcomeComponent), + title: 'Welcome - Quiz Platform' + }, + // TODO: Add more routes as components are created // - Home page (public) // - Dashboard (protected with authGuard) diff --git a/frontend/src/app/features/auth/login/login.ts b/frontend/src/app/features/auth/login/login.ts index 4bd0b5f..1037722 100644 --- a/frontend/src/app/features/auth/login/login.ts +++ b/frontend/src/app/features/auth/login/login.ts @@ -142,7 +142,7 @@ export class LoginComponent { this.guestService.startSession().subscribe({ next: () => { this.isStartingGuestSession.set(false); - this.router.navigate(['/categories']); + this.router.navigate(['/guest-welcome']); }, error: () => { this.isStartingGuestSession.set(false);