Skip to content

Commit

Permalink
refactor(route): lazy load all routes + fix result button positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Hermann committed Dec 5, 2024
1 parent 4b11ad0 commit 84a84ed
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
21 changes: 7 additions & 14 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
import type { Routes } from '@angular/router';
import { HomeComponent } from './pages/home/home.component';
import { LearningComponent } from './pages/learning/learning.component';
import { SettingsComponent } from './pages/settings/settings.component';
import { RideLocalComponent } from './pages/ride-local/ride-local.component';
import { LocalEventComponent } from './pages/local-event/local-event.component';
import { RaceComponent } from './pages/race/race.component';
import { CreateTrackComponent } from './pages/create-track/create-track.component';

export const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'learning', component: LearningComponent },
{ path: 'settings', component: SettingsComponent },
{ path: 'ride-local', component: RideLocalComponent },
{ path: 'local-event', component: LocalEventComponent },
{ path: 'create-track', component: CreateTrackComponent },
{ path: 'race', component: RaceComponent },
{ path: '', loadComponent: () => import('./pages/home/home.component').then(m => m.HomeComponent) },
{ path: 'learning', loadComponent: () => import('./pages/learning/learning.component').then(m => m.LearningComponent) },
{ path: 'settings', loadComponent: () => import('./pages/settings/settings.component').then(m => m.SettingsComponent) },
{ path: 'ride-local', loadComponent: () => import('./pages/ride-local/ride-local.component').then(m => m.RideLocalComponent) },
{ path: 'local-event', loadComponent: () => import('./pages/local-event/local-event.component').then(m => m.LocalEventComponent) },
{ path: 'create-track', loadComponent: () => import('./pages/create-track/create-track.component').then(m => m.CreateTrackComponent) },
{ path: 'race', loadComponent: () => import('./pages/race/race.component').then(m => m.RaceComponent) },
{ path: '**', pathMatch: 'full', redirectTo: '' }
];
3 changes: 3 additions & 0 deletions src/app/pages/race/race.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@

.retro-footer {
padding: 0.5rem;
.retro-button {
margin-bottom: 1rem;
}
}
}
}

0 comments on commit 84a84ed

Please sign in to comment.