Update src/app/shop/[id]/page.tsx
This commit is contained in:
@@ -11,6 +11,7 @@ import ProductCart from "@/components/ecommerce/cart/ProductCart";
|
||||
import { useProductDetail } from "@/hooks/useProductDetail";
|
||||
import { useCart } from "@/hooks/useCart";
|
||||
import { useCheckout } from "@/hooks/useCheckout";
|
||||
import Link from 'next/link';
|
||||
|
||||
interface ProductPageProps {
|
||||
params: Promise<{ id: string }>;
|
||||
@@ -82,14 +83,14 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleCentered
|
||||
brandName="Prestige Realty"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" }
|
||||
]}
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
<NavbarStyleCentered
|
||||
brandName="Prestige Realty"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" }
|
||||
]}
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<p className="text-foreground">Loading product...</p>
|
||||
@@ -155,91 +156,91 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleCentered
|
||||
brandName="Prestige Realty"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" }
|
||||
]}
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
<NavbarStyleCentered
|
||||
brandName="Prestige Realty"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" }
|
||||
]}
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
<div id="product-detail-card" data-section="product-detail-card">
|
||||
<ProductDetailCard
|
||||
layout="page"
|
||||
name={product.name}
|
||||
price={product.price}
|
||||
salePrice={meta.salePrice}
|
||||
rating={product.rating || 0}
|
||||
description={product.description}
|
||||
images={images}
|
||||
variants={variants.length > 0 ? variants : undefined}
|
||||
quantity={quantityVariant}
|
||||
ribbon={meta.ribbon}
|
||||
inventoryStatus={meta.inventoryStatus}
|
||||
inventoryQuantity={meta.inventoryQuantity}
|
||||
sku={meta.sku}
|
||||
buttons={[
|
||||
{ text: "Add To Cart", onClick: handleAddToCart },
|
||||
{ text: "Buy Now", onClick: handleBuyNow },
|
||||
]}
|
||||
/>
|
||||
<ProductDetailCard
|
||||
layout="page"
|
||||
name={product.name}
|
||||
price={product.price}
|
||||
salePrice={meta.salePrice}
|
||||
rating={product.rating || 0}
|
||||
description={product.description}
|
||||
images={images}
|
||||
variants={variants.length > 0 ? variants : undefined}
|
||||
quantity={quantityVariant}
|
||||
ribbon={meta.ribbon}
|
||||
inventoryStatus={meta.inventoryStatus}
|
||||
inventoryQuantity={meta.inventoryQuantity}
|
||||
sku={meta.sku}
|
||||
buttons={[
|
||||
{ text: "Add To Cart", onClick: handleAddToCart },
|
||||
{ text: "Buy Now", onClick: handleBuyNow },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div id="product-cart" data-section="product-cart">
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
onClose={() => setCartOpen(false)}
|
||||
items={cartItems}
|
||||
onQuantityChange={updateQuantity}
|
||||
onRemove={removeItem}
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
onClose={() => setCartOpen(false)}
|
||||
items={cartItems}
|
||||
onQuantityChange={updateQuantity}
|
||||
onRemove={removeItem}
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterBaseCard
|
||||
logoText="Prestige Realty"
|
||||
copyrightText="© 2025 Prestige Realty. All rights reserved. Luxury real estate excellence."
|
||||
columns={[
|
||||
{
|
||||
title: "Properties", items: [
|
||||
{ label: "Featured Listings", href: "/properties" },
|
||||
{ label: "Coming Soon", href: "#" },
|
||||
{ label: "Sold Properties", href: "#" },
|
||||
{ label: "Portfolio Search", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Company", items: [
|
||||
{ label: "About Us", href: "/about" },
|
||||
{ label: "Our Team", href: "#team" },
|
||||
{ label: "Market Insights", href: "#" },
|
||||
{ label: "Careers", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Services", items: [
|
||||
{ label: "Property Sales", href: "#" },
|
||||
{ label: "Acquisitions", href: "#" },
|
||||
{ label: "Valuations", href: "#" },
|
||||
{ label: "Portfolio Management", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Contact", items: [
|
||||
{ label: "Schedule Tour", href: "#contact" },
|
||||
{ label: "Contact Form", href: "#contact" },
|
||||
{ label: "Support", href: "#" },
|
||||
{ label: "Inquiries", href: "#" }
|
||||
]
|
||||
}
|
||||
]
|
||||
onPrivacyClick={null}
|
||||
/>
|
||||
<FooterBaseCard
|
||||
logoText="Prestige Realty"
|
||||
copyrightText="© 2025 Prestige Realty. All rights reserved. Luxury real estate excellence."
|
||||
columns={[
|
||||
{
|
||||
title: "Properties", items: [
|
||||
{ label: "Featured Listings", href: "/properties" },
|
||||
{ label: "Coming Soon", href: "#" },
|
||||
{ label: "Sold Properties", href: "#" },
|
||||
{ label: "Portfolio Search", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Company", items: [
|
||||
{ label: "About Us", href: "/about" },
|
||||
{ label: "Our Team", href: "#team" },
|
||||
{ label: "Market Insights", href: "#" },
|
||||
{ label: "Careers", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Services", items: [
|
||||
{ label: "Property Sales", href: "#" },
|
||||
{ label: "Acquisitions", href: "#" },
|
||||
{ label: "Valuations", href: "#" },
|
||||
{ label: "Portfolio Management", href: "#" }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Contact", items: [
|
||||
{ label: "Schedule Tour", href: "/contact" },
|
||||
{ label: "Contact Form", href: "/contact" },
|
||||
{ label: "Support", href: "#" },
|
||||
{ label: "Inquiries", href: "#" }
|
||||
]
|
||||
}
|
||||
]}
|
||||
onPrivacyClick={() => console.log('Privacy clicked')}
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
|
||||
Reference in New Issue
Block a user