Skip to content

Commit

Permalink
fix: Different navbar items if logged in / out
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Feb 15, 2024
1 parent 6ac6d7a commit 7aaa74a
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/app/shared/components/nav-bar/nav-bar.component.html
Original file line number Diff line number Diff line change
@@ -5,15 +5,24 @@
</button>
<div [ngbCollapse]="menuCollapsed" class="collapse navbar-collapse">
<ul class="navbar-nav me-auto">
<li class="nav-item" routerLinkActive="active">
<a class="nav-link" routerLink="/audits">Audits</a>
</li>
<li class="nav-item" >
<a class="nav-link" routerLink="/change-password">Change Password</a>
</li>
<li class="nav-item">
<a class="nav-link logout-btn" (click)="logout()" style="cursor: pointer;">Logout</a>
</li>
@if (authService.currentLoginUser) {
<li class="nav-item" routerLinkActive="active">
<a class="nav-link" routerLink="/audits">Audits</a>
</li>
<li class="nav-item" >
<a class="nav-link" routerLink="/change-password">Change Password</a>
</li>
<li class="nav-item">
<a class="nav-link logout-btn" (click)="logout()" style="cursor: pointer;">Log Out</a>
</li>
} @else {
<li class="nav-item" routerLinkActive="active">
<a class="nav-link" routerLink="/auth/login">Log In</a>
</li>
<li class="nav-item" routerLinkActive="active">
<a class="nav-link" routerLink="/auth/signup">Sign Up</a>
</li>
}
</ul>
</div>
</div>

0 comments on commit 7aaa74a

Please sign in to comment.