diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b8a27b65e0260fe2bd65a2d575b8af3506c09d3e..a67351971c8528651b8f25fa4829faeaacc8f4b6 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -6,7 +6,7 @@ import { FormComponent } from './form/form.component'; import { AdminGuard } from './guards/admin.guard'; import { AuthGuard } from './guards/auth.guard'; import { DeactivateGuard } from './guards/deactivate.guard'; -import { HomeComponent } from './home/home.component'; +import { CartoComponent } from './carto/carto.component'; import { LegalNoticeComponent } from './legal-notice/legal-notice.component'; import { ProfileComponent } from './profile/profile.component'; import { ResetEmailComponent } from './reset-email/reset-email.component'; @@ -20,25 +20,17 @@ import { UserVerificationComponent } from './user-verification/user-verification const routes: Routes = [ { path: 'print', outlet: 'print', children: [{ path: 'structure', component: StructureDetailsComponent }] }, { - path: 'home', - component: HomeComponent, - }, - { - path: 'projects', - component: HomeComponent, + path: 'acteurs', + component: CartoComponent, }, { path: 'login', - component: HomeComponent, + component: CartoComponent, }, { - path: 'sturctures', + path: 'structures', component: StructureListComponent, }, - { - path: 'resources', - component: HomeComponent, - }, { path: 'legal-notice', component: LegalNoticeComponent, @@ -91,9 +83,13 @@ const routes: Routes = [ path: 'news', loadChildren: () => import('./post/post.module').then((m) => m.PostModule), }, + { + path: 'home', + redirectTo: 'news', + }, { path: '**', - redirectTo: 'home', + redirectTo: 'news', }, ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8db542e8f1a79efb23270730473c3bcc42c0d9e2..66361127454503e62c9ecf213f56865b6e9783ad 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,7 +5,7 @@ import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; -import { HomeComponent } from './home/home.component'; +import { CartoComponent } from './carto/carto.component'; import { CustomBreakPointsProvider } from './config/custom-breakpoint'; import { FooterComponent } from './footer/footer.component'; import { HeaderComponent } from './header/header.component'; @@ -38,7 +38,7 @@ import { StructureJoinComponent } from './structure-join/structure-join.componen AppComponent, HeaderComponent, FooterComponent, - HomeComponent, + CartoComponent, StructureListComponent, CardComponent, SearchComponent, diff --git a/src/app/home/home.component.html b/src/app/carto/carto.component.html similarity index 100% rename from src/app/home/home.component.html rename to src/app/carto/carto.component.html diff --git a/src/app/home/home.component.scss b/src/app/carto/carto.component.scss similarity index 100% rename from src/app/home/home.component.scss rename to src/app/carto/carto.component.scss diff --git a/src/app/home/home.component.spec.ts b/src/app/carto/carto.component.spec.ts similarity index 84% rename from src/app/home/home.component.spec.ts rename to src/app/carto/carto.component.spec.ts index 5606d294ab04d1634711140effed0cecb6dea0f1..c97da2f6abaf651f4fef425db98a6f82494c56f7 100644 --- a/src/app/home/home.component.spec.ts +++ b/src/app/carto/carto.component.spec.ts @@ -1,16 +1,16 @@ import { HttpClientModule } from '@angular/common/http'; import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { HomeComponent } from './home.component'; +import { CartoComponent } from './carto.component'; describe('HomeComponent', () => { - let component: HomeComponent; - let fixture: ComponentFixture<HomeComponent>; + let component: CartoComponent; + let fixture: ComponentFixture<CartoComponent>; let originalTimeout; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [HomeComponent], + declarations: [CartoComponent], imports: [HttpClientModule], }).compileComponents(); }); @@ -22,7 +22,7 @@ describe('HomeComponent', () => { beforeEach(() => { originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL; jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; - fixture = TestBed.createComponent(HomeComponent); + fixture = TestBed.createComponent(CartoComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/app/home/home.component.ts b/src/app/carto/carto.component.ts similarity index 97% rename from src/app/home/home.component.ts rename to src/app/carto/carto.component.ts index 5a803cdb4651663e181654ccab74a43e56b3de79..e04b0f12de273f01559f5bf1f401a1c35acbf318 100644 --- a/src/app/home/home.component.ts +++ b/src/app/carto/carto.component.ts @@ -10,11 +10,11 @@ import { GeojsonService } from '../services/geojson.service'; import { CustomRegExp } from '../utils/CustomRegExp'; @Component({ - selector: 'app-home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.scss'], + selector: 'app-carto', + templateUrl: './carto.component.html', + styleUrls: ['./carto.component.scss'], }) -export class HomeComponent implements OnInit { +export class CartoComponent implements OnInit { public structures: Structure[] = []; public displayMarkerId: string; public selectedMarkerId: string; diff --git a/src/app/header/header.component.html b/src/app/header/header.component.html index 7fc0ea9a68139de58d4d68c2c85c34288b4ec9f3..9e8cab7b2bc323d9824705d48cc384d9d2cca61c 100644 --- a/src/app/header/header.component.html +++ b/src/app/header/header.component.html @@ -10,7 +10,7 @@ </div> <div fxLayout="row" class="right-header" fxLayoutAlign="center center" fxLayoutGap="3vw"> <a routerLink="/news" [routerLinkActive]="'active'" i18n>Actualités</a> - <a routerLink="/home" [routerLinkActive]="'active'" i18n>Cartographie de acteurs</a> + <a routerLink="/acteurs" [routerLinkActive]="'active'" i18n>Cartographie de acteurs</a> <a routerLink="/about" [routerLinkActive]="'active'" i18n>Qui sommes-nous ?</a> <a *ngIf="isAdmin" routerLink="/admin" [routerLinkActive]="'active'">Administration</a> <button *ngIf="isLoggedIn" class="red" routerLink="/profile" [routerLinkActive]="'active'">