Update src/app/shop/[id]/page.tsx
This commit is contained in:
@@ -74,7 +74,10 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||
}, [cartItems, checkout, getCheckoutItems]);
|
||||
|
||||
if (isLoading) {
|
||||
|
||||
const navItems = [{ name: "Home", id: "/" }, { name: "Blog", id: "/blog" }, { name: "Shop", id: "/shop" }];
|
||||
const footerColumns = [{ items: [{ label: "Home", href: "/" }, { label: "Services", href: "/#features" }, { label: "About Us", href: "/#about" }] }, { items: [{ label: "Clients", href: "/#social-proof" }, { label: "Testimonials", href: "/#testimonials" }, { label: "Contact", href: "/#contact" }] }];
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
@@ -89,55 +92,25 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleFullscreen
|
||||
navItems={[{ name: "Home", id: "/" }, { name: "Services", id: "services" }, { name: "About", id: "about" }, { name: "Clients", id: "clients" }, { name: "Contact", id: "contact" }, { name: "Shop", id: "/shop" }]}
|
||||
navItems={navItems}
|
||||
brandName="DigitalEdge"
|
||||
bottomLeftText="Innovation in Digital"
|
||||
bottomRightText="info@digitaledge.com"
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{isLoading && (
|
||||
<div id="loading-section" data-section="loading-section">
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<p className="text-foreground">Loading product...</p>
|
||||
</main>
|
||||
</div>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoEmphasis
|
||||
columns={[{ items: [{ label: "Home", href: "home" }, { label: "Services", href: "services" }, { label: "About Us", href: "about" }] }, { items: [{ label: "Clients", href: "clients" }, { label: "Testimonials", href: "testimonials" }, { label: "Contact", href: "contact" }] }]}
|
||||
logoText="DigitalEdge"
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
)}
|
||||
|
||||
if (!product) {
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="pill"
|
||||
contentWidth="mediumSmall"
|
||||
sizing="mediumLargeSizeLargeTitles"
|
||||
background="floatingGradient"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="gradient"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleFullscreen
|
||||
navItems={[{ name: "Home", id: "/" }, { name: "Services", id: "services" }, { name: "About", id: "about" }, { name: "Clients", id: "clients" }, { name: "Contact", id: "contact" }, { name: "Shop", id: "/shop" }]}
|
||||
brandName="DigitalEdge"
|
||||
bottomLeftText="Innovation in Digital"
|
||||
bottomRightText="info@digitaledge.com"
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
{!isLoading && !product && (
|
||||
<div id="not-found-section" data-section="not-found-section">
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<div className="text-center">
|
||||
@@ -151,40 +124,9 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoEmphasis
|
||||
columns={[{ items: [{ label: "Home", href: "home" }, { label: "Services", href: "services" }, { label: "About Us", href: "about" }] }, { items: [{ label: "Clients", href: "clients" }, { label: "Testimonials", href: "testimonials" }, { label: "Contact", href: "contact" }] }]}
|
||||
logoText="DigitalEdge"
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
)}
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="shift-hover"
|
||||
defaultTextAnimation="entrance-slide"
|
||||
borderRadius="pill"
|
||||
contentWidth="mediumSmall"
|
||||
sizing="mediumLargeSizeLargeTitles"
|
||||
background="floatingGradient"
|
||||
cardStyle="glass-elevated"
|
||||
primaryButtonStyle="gradient"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleFullscreen
|
||||
navItems={[{ name: "Home", id: "/" }, { name: "Services", id: "services" }, { name: "About", id: "about" }, { name: "Clients", id: "clients" }, { name: "Contact", id: "contact" }, { name: "Shop", id: "/shop" }]}
|
||||
brandName="DigitalEdge"
|
||||
bottomLeftText="Innovation in Digital"
|
||||
bottomRightText="info@digitaledge.com"
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
{!isLoading && product && (
|
||||
<div id="product-detail-card" data-section="product-detail-card">
|
||||
<ProductDetailCard
|
||||
layout="page"
|
||||
@@ -206,6 +148,8 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div id="product-cart" data-section="product-cart">
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
@@ -221,9 +165,10 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoEmphasis
|
||||
columns={[{ items: [{ label: "Home", href: "home" }, { label: "Services", href: "services" }, { label: "About Us", href: "about" }] }, { items: [{ label: "Clients", href: "clients" }, { label: "Testimonials", href: "testimonials" }, { label: "Contact", href: "contact" }] }]}
|
||||
columns={footerColumns}
|
||||
logoText="DigitalEdge"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user