diff --git a/src/app/products/[id]/page.tsx b/src/app/products/[id]/page.tsx index 09bcad4..9d89568 100644 --- a/src/app/products/[id]/page.tsx +++ b/src/app/products/[id]/page.tsx @@ -61,7 +61,7 @@ function Page() { }; return (
- {/* // */} + {/* // */}
<> {isLoading ? ( @@ -157,8 +157,10 @@ function Page() { />
- - {productPrice}{' '} + + + {productPrice.toLocaleString()} + {' '} RWF diff --git a/src/components/Header.tsx b/src/components/Header.tsx index d12ccaa..f4a80ef 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -34,6 +34,7 @@ import { import { useRouter } from 'next/navigation'; const Header = () => { const { isOrdersOverlayOpen, toggleOrdersSlider } = OrdersOverlay(); + const [activelink, setActivelink] = useState('home'); const [showlModal, setShowmodal] = useState(false); const [showCart, setShowCart] = useState(false); @@ -69,6 +70,13 @@ const Header = () => { const [viewMenu, setViewmenu] = useState(false); const [userdata, setUserdata] = useState(null); useEffect(() => { + const link = window.location.href + .toString() + .split('/') + .splice(-1) + .toString(); + setActivelink(link); + const user = localStorage.getItem('profile'); const userData = JSON.parse(user as string); setUserdata(userData); @@ -87,6 +95,7 @@ const Header = () => { ? router.push('/profile') : router.push('/dashboard'); }; + return ( <>
@@ -181,22 +190,24 @@ const Header = () => {
)} -
-