diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 29b9f53..f634d34 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -4,9 +4,11 @@ import Welcome from './components/Welcome';
import About from './components/About';
import Footer from './components/Footer';
import Products from './components/entity/product/Products';
+import Cart from './components/entity/cart/Cart';
import Login from './components/Login';
import { AuthProvider } from './context/AuthContext';
import { ThemeProvider } from './context/ThemeContext';
+import { CartProvider } from './context/CartContext';
import AdminProducts from './components/admin/AdminProducts';
import { useTheme } from './context/ThemeContext';
@@ -25,6 +27,7 @@ function ThemedApp() {
} />
} />
} />
+ } />
} />
} />
@@ -39,7 +42,9 @@ function App() {
return (
-
+
+
+
);
diff --git a/frontend/src/components/Navigation.tsx b/frontend/src/components/Navigation.tsx
index 5f35e12..57bd2c9 100644
--- a/frontend/src/components/Navigation.tsx
+++ b/frontend/src/components/Navigation.tsx
@@ -1,11 +1,13 @@
import { Link } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
import { useTheme } from '../context/ThemeContext';
+import { useCart } from '../context/CartContext';
import { useState } from 'react';
export default function Navigation() {
const { isLoggedIn, isAdmin, logout } = useAuth();
const { darkMode, toggleTheme } = useTheme();
+ const { cart } = useCart();
const [adminMenuOpen, setAdminMenuOpen] = useState(false);
return (
@@ -85,6 +87,30 @@ export default function Navigation() {
+
+
+ {cart.totalItems > 0 && (
+
+ {cart.totalItems}
+
+ )}
+