Add login, reg, cart, newsletter und access to small batch releases
This commit is contained in:
1 parent
414967441a
commit
fb801e3752
30 files changed
+2979
-246
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import { Link } from "react-router";
|
||||
import { useShop } from "../shop/useShop";
|
||||
import "../style/navbar.css";
|
||||
|
||||
function SharedNavbar({ variant = "light", active = "" }) {
|
||||
const { cart, openCart, openProfile, user } = useShop();
|
||||
const cartLabel =
|
||||
cart.total_quantity > 0 ? `Cart ${cart.total_quantity}` : "Cart";
|
||||
|
||||
return (
|
||||
<nav className={`navbar navbar--${variant}`} aria-label="Hauptnavigation">
|
||||
<div className="nav-pill">
|
||||
<Link to="/" className={`nav-link ${active === "atmos" ? "active" : ""}`}>
|
||||
atmos
|
||||
</Link>
|
||||
<Link
|
||||
to="/discovery-set"
|
||||
className={`nav-link ${active === "testen" ? "active" : ""}`}
|
||||
>
|
||||
Testen
|
||||
</Link>
|
||||
<button type="button" className="nav-link nav-button" onClick={openCart}>
|
||||
{cartLabel}
|
||||
</button>
|
||||
<button type="button" className="nav-link nav-button" onClick={openProfile}>
|
||||
{user ? "Profile" : "Profile"}
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
}
|
||||
|
||||
export default SharedNavbar;
|
||||
Reference in new issue
Block a user