diff --git a/src/app/components/navbar/navbar.component.css b/src/app/components/navbar/navbar.component.css
new file mode 100644
index 0000000..18b13d7
--- /dev/null
+++ b/src/app/components/navbar/navbar.component.css
@@ -0,0 +1,41 @@
+.header {
+ background: white;
+ padding: 20px 40px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.header h1 {
+ margin: 0;
+ font-size: 24px;
+ color: #667eea;
+ font-weight: 700;
+}
+
+.user-info {
+ display: flex;
+ align-items: center;
+ gap: 15px;
+}
+
+.username {
+ font-weight: 500;
+ color: #333;
+}
+
+.btn-logout {
+ padding: 8px 20px;
+ background-color: #667eea;
+ color: white;
+ border: none;
+ border-radius: 6px;
+ cursor: pointer;
+ font-weight: 500;
+ transition: background-color 0.3s;
+}
+
+.btn-logout:hover {
+ background-color: #5568d3;
+}
diff --git a/src/app/components/navbar/navbar.component.html b/src/app/components/navbar/navbar.component.html
new file mode 100644
index 0000000..deb9efd
--- /dev/null
+++ b/src/app/components/navbar/navbar.component.html
@@ -0,0 +1,9 @@
+
diff --git a/src/app/components/navbar/navbar.component.ts b/src/app/components/navbar/navbar.component.ts
new file mode 100644
index 0000000..b05e77d
--- /dev/null
+++ b/src/app/components/navbar/navbar.component.ts
@@ -0,0 +1,27 @@
+import { Component, inject } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { AuthService } from '../../services/auth.service';
+
+@Component({
+ selector: 'app-navbar',
+ standalone: true,
+ imports: [CommonModule],
+ templateUrl: './navbar.component.html',
+ styleUrl: './navbar.component.css'
+})
+export class NavbarComponent {
+ protected authService = inject(AuthService);
+
+ logout() {
+ this.authService.logout().subscribe({
+ next: () => {
+ console.log('Logout successful');
+ },
+ error: (error) => {
+ console.error('Logout error:', error);
+ // Even if the API call fails, clear local state and redirect
+ this.authService.clearAuthState();
+ }
+ });
+ }
+}
diff --git a/src/app/navbar/navbar.css b/src/app/navbar/navbar.css
deleted file mode 100644
index 4342c64..0000000
--- a/src/app/navbar/navbar.css
+++ /dev/null
@@ -1,15 +0,0 @@
-nav .navbar {
- width: 100%;
- height: max-content;
-
- display: flex;
- flex-direction: row;
- align-items: center;
-
- padding: 1.5rem;
-
-}
-
-span .navbar-title {
- display: block;
-}
\ No newline at end of file
diff --git a/src/app/navbar/navbar.html b/src/app/navbar/navbar.html
deleted file mode 100644
index 1a991d3..0000000
--- a/src/app/navbar/navbar.html
+++ /dev/null
@@ -1,4 +0,0 @@
-
\ No newline at end of file
diff --git a/src/app/navbar/navbar.spec.ts b/src/app/navbar/navbar.spec.ts
deleted file mode 100644
index 6c5e78a..0000000
--- a/src/app/navbar/navbar.spec.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { Navbar } from './navbar';
-
-describe('Navbar', () => {
- let component: Navbar;
- let fixture: ComponentFixture;
-
- beforeEach(async () => {
- await TestBed.configureTestingModule({
- imports: [Navbar]
- })
- .compileComponents();
-
- fixture = TestBed.createComponent(Navbar);
- component = fixture.componentInstance;
- await fixture.whenStable();
- });
-
- it('should create', () => {
- expect(component).toBeTruthy();
- });
-});
diff --git a/src/app/navbar/navbar.ts b/src/app/navbar/navbar.ts
deleted file mode 100644
index 2376dc5..0000000
--- a/src/app/navbar/navbar.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { Component, inject } from '@angular/core';
-import { AuthService } from '../services/auth.service';
-
-@Component({
- selector: 'app-navbar',
- imports: [],
- templateUrl: './navbar.html',
- styleUrl: './navbar.css',
-})
-export class Navbar {
- protected authService = inject(AuthService);
-
-
-}