Skip to content

Commit 1cf5f00

Browse files
authored
refactor(root): changed name from root to layout (#647)
1 parent cce3286 commit 1cf5f00

File tree

7 files changed

+14
-19
lines changed

7 files changed

+14
-19
lines changed

src/app/app.component.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,9 @@ export class AppComponent implements OnInit {
4545
ngOnInit(): void {
4646
this.actions.getCurrentUser();
4747

48-
this.actions$
49-
.pipe(
50-
ofActionSuccessful(GetCurrentUser),
51-
take(1)
52-
)
53-
.subscribe(() => {
54-
this.actions.getEmails();
55-
});
48+
this.actions$.pipe(ofActionSuccessful(GetCurrentUser), take(1)).subscribe(() => {
49+
this.actions.getEmails();
50+
});
5651

5752
if (this.environment.googleTagManagerId) {
5853
this.router.events

src/app/app.routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { LicensesService } from './shared/services';
1818
export const routes: Routes = [
1919
{
2020
path: '',
21-
loadComponent: () => import('./core/components/root/root.component').then((mod) => mod.RootComponent),
21+
loadComponent: () => import('./core/components/layout/layout.component').then((mod) => mod.LayoutComponent),
2222
children: [
2323
{
2424
path: '',

src/app/core/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
export { BreadcrumbComponent } from './breadcrumb/breadcrumb.component';
22
export { FooterComponent } from './footer/footer.component';
33
export { HeaderComponent } from './header/header.component';
4+
export { LayoutComponent } from './layout/layout.component';
45
export { MaintenanceBannerComponent } from './osf-banners/maintenance-banner/maintenance-banner.component';
56
export { PageNotFoundComponent } from './page-not-found/page-not-found.component';
6-
export { RootComponent } from './root/root.component';
77
export { SidenavComponent } from './sidenav/sidenav.component';
88
export { TopnavComponent } from './topnav/topnav.component';
File renamed without changes.
File renamed without changes.

src/app/core/components/root/root.component.spec.ts renamed to src/app/core/components/layout/layout.component.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ import { OSFBannerComponent } from '../osf-banners/osf-banner.component';
1616
import { SidenavComponent } from '../sidenav/sidenav.component';
1717
import { TopnavComponent } from '../topnav/topnav.component';
1818

19-
import { RootComponent } from './root.component';
19+
import { LayoutComponent } from './layout.component';
2020

2121
import { OSFTestingModule } from '@testing/osf.testing.module';
2222

2323
describe('Component: Root', () => {
24-
let component: RootComponent;
25-
let fixture: ComponentFixture<RootComponent>;
24+
let component: LayoutComponent;
25+
let fixture: ComponentFixture<LayoutComponent>;
2626
let isWebSubject: BehaviorSubject<boolean>;
2727

2828
beforeEach(async () => {
2929
isWebSubject = new BehaviorSubject<boolean>(true);
3030

3131
await TestBed.configureTestingModule({
3232
imports: [
33-
RootComponent,
33+
LayoutComponent,
3434
OSFTestingModule,
3535
...MockComponents(
3636
HeaderComponent,
@@ -45,7 +45,7 @@ describe('Component: Root', () => {
4545
providers: [MockProvider(IS_WEB, isWebSubject), MockProvider(ConfirmationService)],
4646
}).compileComponents();
4747

48-
fixture = TestBed.createComponent(RootComponent);
48+
fixture = TestBed.createComponent(LayoutComponent);
4949
component = fixture.componentInstance;
5050
fixture.detectChanges();
5151
});

src/app/core/components/root/root.component.ts renamed to src/app/core/components/layout/layout.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { SidenavComponent } from '../sidenav/sidenav.component';
1818
import { TopnavComponent } from '../topnav/topnav.component';
1919

2020
@Component({
21-
selector: 'osf-root',
21+
selector: 'osf-layout',
2222
imports: [
2323
BreadcrumbComponent,
2424
CommonModule,
@@ -32,11 +32,11 @@ import { TopnavComponent } from '../topnav/topnav.component';
3232
TopnavComponent,
3333
TranslatePipe,
3434
],
35-
templateUrl: './root.component.html',
36-
styleUrls: ['./root.component.scss'],
35+
templateUrl: './layout.component.html',
36+
styleUrls: ['./layout.component.scss'],
3737
changeDetection: ChangeDetectionStrategy.OnPush,
3838
})
39-
export class RootComponent {
39+
export class LayoutComponent {
4040
isWeb = toSignal(inject(IS_WEB));
4141
isMedium = toSignal(inject(IS_MEDIUM));
4242
}

0 commit comments

Comments
 (0)