Updated the navbar hiding logic to actually work

This commit is contained in:
ItzMineyy committed 2024-12-28 16:39:57 +01:00
1 parent a8bd5e0060
commit 5fbb41c477
1 file changed
+16 -6
+16 -6
View File
@@ -93,12 +93,22 @@ export class AppComponent implements OnInit {
const currentRoute = this.activatedRoute.snapshot.firstChild?.routeConfig?.path;
// Hide navbar and footer on admin route
if (currentRoute === 'admin'||'login') {
this.showNavbar = false;
this.showFooter = false;
} else {
this.showNavbar = true;
this.showFooter = true;
switch (currentRoute) {
case 'admin': {
this.showNavbar = false;
this.showFooter = false;
break;
}
case "login": {
this.showNavbar = false;
this.showFooter = false;
break;
}
default: {
this.showNavbar = true;
this.showFooter = true;
break;
}
}
}
}