Update src/app/shop/[id]/page.tsx
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use client";
|
||||
"use client";
|
||||
|
||||
import { Suspense, use, useCallback } from "react";
|
||||
import { Suspense, useCallback } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import ReactLenis from "lenis/react";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
@@ -13,7 +13,7 @@ import { useCart } from "@/hooks/useCart";
|
||||
import { useCheckout } from "@/hooks/useCheckout";
|
||||
|
||||
interface ProductPageProps {
|
||||
params: Promise<{ id: string }>;
|
||||
params: { id: string };
|
||||
}
|
||||
|
||||
export default function ProductPage({ params }: ProductPageProps) {
|
||||
@@ -25,7 +25,7 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
}
|
||||
|
||||
function ProductPageContent({ params }: ProductPageProps) {
|
||||
const { id } = use(params);
|
||||
const { id } = params;
|
||||
const router = useRouter();
|
||||
|
||||
const {
|
||||
@@ -95,7 +95,6 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
brandName="Pia"
|
||||
bottomLeftText="Experience the perfect brew."
|
||||
bottomRightText="hello@piacoffee.com"
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
<main id="loading-section" data-section="loading-section" className="min-h-screen flex items-center justify-center pt-20">
|
||||
@@ -104,8 +103,8 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterSimple
|
||||
columns={[
|
||||
{ title: "Explore", items: [{ label: "Home", href: "#home" }, { label: "Menu", href: "#menu" }, { label: "About Us", href: "#about" }] },
|
||||
{ title: "Connect", items: [{ label: "Contact", href: "#contact" }, { label: "Instagram", href: "https://www.instagram.com/pia.coffeeshop" }] },
|
||||
{ title: "Explore", items: [{ label: "Home", href: "/" }, { label: "Menu", href: "/#menu" }, { label: "About Us", href: "/#about" }] },
|
||||
{ title: "Connect", items: [{ label: "Contact", href: "/#contact" }, { label: "Instagram", href: "https://www.instagram.com/pia.coffeeshop" }] },
|
||||
{ title: "Legal", items: [{ label: "Privacy Policy", href: "/privacy" }, { label: "Terms of Service", href: "/terms" }] }
|
||||
]}
|
||||
bottomLeftText="© 2024 Pia Coffeeshop. All rights reserved."
|
||||
@@ -138,7 +137,6 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
brandName="Pia"
|
||||
bottomLeftText="Experience the perfect brew."
|
||||
bottomRightText="hello@piacoffee.com"
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
<main id="not-found-section" data-section="not-found-section" className="min-h-screen flex items-center justify-center pt-20">
|
||||
@@ -155,8 +153,8 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterSimple
|
||||
columns={[
|
||||
{ title: "Explore", items: [{ label: "Home", href: "#home" }, { label: "Menu", href: "#menu" }, { label: "About Us", href: "#about" }] },
|
||||
{ title: "Connect", items: [{ label: "Contact", href: "#contact" }, { label: "Instagram", href: "https://www.instagram.com/pia.coffeeshop" }] },
|
||||
{ title: "Explore", items: [{ label: "Home", href: "/" }, { label: "Menu", href: "/#menu" }, { label: "About Us", href: "/#about" }] },
|
||||
{ title: "Connect", items: [{ label: "Contact", href: "/#contact" }, { label: "Instagram", href: "https://www.instagram.com/pia.coffeeshop" }] },
|
||||
{ title: "Legal", items: [{ label: "Privacy Policy", href: "/privacy" }, { label: "Terms of Service", href: "/terms" }] }
|
||||
]}
|
||||
bottomLeftText="© 2024 Pia Coffeeshop. All rights reserved."
|
||||
@@ -188,7 +186,6 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
brandName="Pia"
|
||||
bottomLeftText="Experience the perfect brew."
|
||||
bottomRightText="hello@piacoffee.com"
|
||||
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||
/>
|
||||
</div>
|
||||
<div id="product-detail-card" data-section="product-detail-card">
|
||||
@@ -230,8 +227,8 @@ function ProductPageContent({ params }: ProductPageProps) {
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterSimple
|
||||
columns={[
|
||||
{ title: "Explore", items: [{ label: "Home", href: "#home" }, { label: "Menu", href: "#menu" }, { label: "About Us", href: "#about" }] },
|
||||
{ title: "Connect", items: [{ label: "Contact", href: "#contact" }, { label: "Instagram", href: "https://www.instagram.com/pia.coffeeshop" }] },
|
||||
{ title: "Explore", items: [{ label: "Home", href: "/" }, { label: "Menu", href: "/#menu" }, { label: "About Us", href: "/#about" }] },
|
||||
{ title: "Connect", items: [{ label: "Contact", href: "/#contact" }, { label: "Instagram", href: "https://www.instagram.com/pia.coffeeshop" }] },
|
||||
{ title: "Legal", items: [{ label: "Privacy Policy", href: "/privacy" }, { label: "Terms of Service", href: "/terms" }] }
|
||||
]}
|
||||
bottomLeftText="© 2024 Pia Coffeeshop. All rights reserved."
|
||||
|
||||
Reference in New Issue
Block a user