Skip to content
This repository has been archived by the owner on Dec 22, 2024. It is now read-only.

Commit

Permalink
Add cart navbar item
Browse files Browse the repository at this point in the history
  • Loading branch information
kkamara committed Dec 2, 2024
1 parent d846c99 commit f5449b9
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions resources/js/components/layouts/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,32 @@ export default function Header(props) {

const renderNavLinks = () => {
if(authResponse.data) {
return <li className="nav-item dropdown">
<a className="nav-link dropdown-toggle active" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
User
</a>
<ul className="dropdown-menu">
<li>
<Link
className="dropdown-item"
to="/user/logout"
>
Sign Out
</Link>
</li>
</ul>
</li>
return <>
<li className="nav-item dropdown">
<a className="nav-link dropdown-toggle active" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
User
</a>
<ul className="dropdown-menu">
<li>
<Link
className="dropdown-item"
to="/user/logout"
>
Sign Out
</Link>
</li>
</ul>
</li>
<li className="nav-item">
<Link
className="nav-link active"
aria-current="page"
to="#"
>
Cart (0)
</Link>
</li>
</>
} else {
return <>
<li className="nav-item">
Expand Down

0 comments on commit f5449b9

Please sign in to comment.