Update src/app/shop/page.tsx
This commit is contained in:
@@ -10,6 +10,7 @@ import ProductCart from "@/components/ecommerce/cart/ProductCart";
|
|||||||
import { useProductCatalog } from "@/hooks/useProductCatalog";
|
import { useProductCatalog } from "@/hooks/useProductCatalog";
|
||||||
import { useCart } from "@/hooks/useCart";
|
import { useCart } from "@/hooks/useCart";
|
||||||
import { useCheckout } from "@/hooks/useCheckout";
|
import { useCheckout } from "@/hooks/useCheckout";
|
||||||
|
import Link from 'next/link';
|
||||||
|
|
||||||
function ShopPageContent() {
|
function ShopPageContent() {
|
||||||
const {
|
const {
|
||||||
@@ -41,6 +42,12 @@ function ShopPageContent() {
|
|||||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||||
}, [cartItems, checkout, getCheckoutItems]);
|
}, [cartItems, checkout, getCheckoutItems]);
|
||||||
|
|
||||||
|
const navItems = [
|
||||||
|
{ name: "Home", id: "/" },
|
||||||
|
{ name: "Blog", id: "/blog" },
|
||||||
|
{ name: "Shop", id: "/shop" },
|
||||||
|
];
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
@@ -58,7 +65,7 @@ function ShopPageContent() {
|
|||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarStyleApple
|
<NavbarStyleApple
|
||||||
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
|
navItems={navItems.map(item => ({...item, component: Link}))}
|
||||||
brandName="bb.q chicken"
|
brandName="bb.q chicken"
|
||||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||||
/>
|
/>
|
||||||
@@ -76,7 +83,6 @@ function ShopPageContent() {
|
|||||||
{ title: "Follow Us", items: [{ label: "Instagram", href: "#" }, { label: "Facebook", href: "#" }, { label: "TikTok", href: "#" }] }
|
{ title: "Follow Us", items: [{ label: "Instagram", href: "#" }, { label: "Facebook", href: "#" }, { label: "TikTok", href: "#" }] }
|
||||||
]}
|
]}
|
||||||
copyrightText="© 2024 bb.q chicken — Columbus. All rights reserved."
|
copyrightText="© 2024 bb.q chicken — Columbus. All rights reserved."
|
||||||
useInvertedBackground={false}
|
|
||||||
ariaLabel="Site footer with navigation and social links."
|
ariaLabel="Site footer with navigation and social links."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,9 +107,9 @@ function ShopPageContent() {
|
|||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarStyleApple
|
<NavbarStyleApple
|
||||||
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
|
navItems={navItems.map(item => ({...item, component: Link}))}
|
||||||
brandName="bb.q chicken"
|
brandName="bb.q chicken"
|
||||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
button={{ text: `Cart (${cartItems.length})`, onClick: () => setCartOpen(true) }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div id="product-catalog" data-section="product-catalog">
|
<div id="product-catalog" data-section="product-catalog">
|
||||||
@@ -140,7 +146,6 @@ function ShopPageContent() {
|
|||||||
{ title: "Follow Us", items: [{ label: "Instagram", href: "#" }, { label: "Facebook", href: "#" }, { label: "TikTok", href: "#" }] }
|
{ title: "Follow Us", items: [{ label: "Instagram", href: "#" }, { label: "Facebook", href: "#" }, { label: "TikTok", href: "#" }] }
|
||||||
]}
|
]}
|
||||||
copyrightText="© 2024 bb.q chicken — Columbus. All rights reserved."
|
copyrightText="© 2024 bb.q chicken — Columbus. All rights reserved."
|
||||||
useInvertedBackground={false}
|
|
||||||
ariaLabel="Site footer with navigation and social links."
|
ariaLabel="Site footer with navigation and social links."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user