Update src/app/shop/[id]/page.tsx
This commit is contained in:
@@ -77,41 +77,60 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="hover-magnetic"
|
defaultButtonVariant="elastic-effect"
|
||||||
defaultTextAnimation="reveal-blur"
|
defaultTextAnimation="entrance-slide"
|
||||||
borderRadius="rounded"
|
borderRadius="pill"
|
||||||
contentWidth="medium"
|
contentWidth="medium"
|
||||||
sizing="large"
|
sizing="mediumLarge"
|
||||||
background="aurora"
|
background="fluid"
|
||||||
cardStyle="inset"
|
cardStyle="soft-shadow"
|
||||||
primaryButtonStyle="primary-glow"
|
primaryButtonStyle="gradient"
|
||||||
secondaryButtonStyle="radial-glow"
|
secondaryButtonStyle="glass"
|
||||||
headingFontWeight="light"
|
headingFontWeight="bold"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarStyleApple
|
<NavbarStyleApple
|
||||||
brandName="Hookah Haven"
|
brandName="MyCo"
|
||||||
navItems={[
|
navItems={[
|
||||||
{ name: "Головна", id: "/" },
|
{ name: "Home", id: "/" },
|
||||||
{ name: "Магазин", id: "/shop" }
|
{ name: "About", id: "/#about" },
|
||||||
|
{ name: "Features", id: "/#features" },
|
||||||
|
{ name: "Products", id: "/#products" },
|
||||||
|
{ name: "Testimonials", id: "/#testimonials" },
|
||||||
|
{ name: "FAQ", id: "/#faq" },
|
||||||
|
{ name: "Contact", id: "/#contact" },
|
||||||
|
{ name: "Blog", id: "/blog" },
|
||||||
|
{ name: "Shop", id: "/shop" }
|
||||||
]}
|
]}
|
||||||
button={{ text: "Кошик", onClick: () => setCartOpen(true) }}
|
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||||
<div id="loading-indicator" data-section="loading-indicator">
|
<div id="loading-indicator" data-section="loading-indicator">
|
||||||
<p className="text-foreground">Завантаження товару...</p>
|
<p className="text-foreground">Loading product...</p>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<div id="footer" data-section="footer">
|
<div id="footer" data-section="footer">
|
||||||
<FooterBaseCard
|
<FooterBaseCard
|
||||||
logoText="Hookah Haven"
|
logoText="MyCo"
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "Магазин", items: [{ label: "Кальяни", href: "#products" }, { label: "Тютюн", href: "#products" }, { label: "Вугілля", href: "#products" }, { label: "Аксесуари", href: "#products" }] },
|
{
|
||||||
{ title: "Компанія", items: [{ label: "Про нас", href: "#about" }, { label: "FAQ", href: "#faq" }, { label: "Контакти", href: "#contact" }] }
|
title: "Solutions", items: [
|
||||||
|
{ label: "Products", href: "/#products" },
|
||||||
|
{ label: "Features", href: "/#features" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Company", items: [
|
||||||
|
{ label: "About Us", href: "/#about" },
|
||||||
|
{ label: "Blog", href: "/blog" },
|
||||||
|
{ label: "FAQ", href: "/#faq" },
|
||||||
|
{ label: "Contact", href: "/#contact" }
|
||||||
|
]
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
copyrightText="© 2024 Hookah Haven. Всі права захищені."
|
copyrightText="© 2024 MyCo. All rights reserved."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ReactLenis>
|
</ReactLenis>
|
||||||
@@ -122,47 +141,66 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
if (!product) {
|
if (!product) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="hover-magnetic"
|
defaultButtonVariant="elastic-effect"
|
||||||
defaultTextAnimation="reveal-blur"
|
defaultTextAnimation="entrance-slide"
|
||||||
borderRadius="rounded"
|
borderRadius="pill"
|
||||||
contentWidth="medium"
|
contentWidth="medium"
|
||||||
sizing="large"
|
sizing="mediumLarge"
|
||||||
background="aurora"
|
background="fluid"
|
||||||
cardStyle="inset"
|
cardStyle="soft-shadow"
|
||||||
primaryButtonStyle="primary-glow"
|
primaryButtonStyle="gradient"
|
||||||
secondaryButtonStyle="radial-glow"
|
secondaryButtonStyle="glass"
|
||||||
headingFontWeight="light"
|
headingFontWeight="bold"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarStyleApple
|
<NavbarStyleApple
|
||||||
brandName="Hookah Haven"
|
brandName="MyCo"
|
||||||
navItems={[
|
navItems={[
|
||||||
{ name: "Головна", id: "/" },
|
{ name: "Home", id: "/" },
|
||||||
{ name: "Магазин", id: "/shop" }
|
{ name: "About", id: "/#about" },
|
||||||
|
{ name: "Features", id: "/#features" },
|
||||||
|
{ name: "Products", id: "/#products" },
|
||||||
|
{ name: "Testimonials", id: "/#testimonials" },
|
||||||
|
{ name: "FAQ", id: "/#faq" },
|
||||||
|
{ name: "Contact", id: "/#contact" },
|
||||||
|
{ name: "Blog", id: "/blog" },
|
||||||
|
{ name: "Shop", id: "/shop" }
|
||||||
]}
|
]}
|
||||||
button={{ text: "Кошик", onClick: () => setCartOpen(true) }}
|
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||||
<div id="not-found" data-section="not-found" className="text-center">
|
<div id="not-found" data-section="not-found" className="text-center">
|
||||||
<p className="text-foreground mb-4">Товар не знайдено</p>
|
<p className="text-foreground mb-4">Product not found</p>
|
||||||
<button
|
<button
|
||||||
onClick={() => router.push("/shop")}
|
onClick={() => router.push("/shop")}
|
||||||
className="primary-button px-6 py-2 rounded-theme text-primary-cta-text"
|
className="primary-button px-6 py-2 rounded-theme text-primary-cta-text"
|
||||||
>
|
>
|
||||||
Повернутися до магазину
|
Back to Shop
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<div id="footer" data-section="footer">
|
<div id="footer" data-section="footer">
|
||||||
<FooterBaseCard
|
<FooterBaseCard
|
||||||
logoText="Hookah Haven"
|
logoText="MyCo"
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "Магазин", items: [{ label: "Кальяни", href: "#products" }, { label: "Тютюн", href: "#products" }, { label: "Вугілля", href: "#products" }, { label: "Аксесуари", href: "#products" }] },
|
{
|
||||||
{ title: "Компанія", items: [{ label: "Про нас", href: "#about" }, { label: "FAQ", href: "#faq" }, { label: "Контакти", href: "#contact" }] }
|
title: "Solutions", items: [
|
||||||
|
{ label: "Products", href: "/#products" },
|
||||||
|
{ label: "Features", href: "/#features" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Company", items: [
|
||||||
|
{ label: "About Us", href: "/#about" },
|
||||||
|
{ label: "Blog", href: "/blog" },
|
||||||
|
{ label: "FAQ", href: "/#faq" },
|
||||||
|
{ label: "Contact", href: "/#contact" }
|
||||||
|
]
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
copyrightText="© 2024 Hookah Haven. Всі права захищені."
|
copyrightText="© 2024 MyCo. All rights reserved."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ReactLenis>
|
</ReactLenis>
|
||||||
@@ -172,26 +210,33 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="hover-magnetic"
|
defaultButtonVariant="elastic-effect"
|
||||||
defaultTextAnimation="reveal-blur"
|
defaultTextAnimation="entrance-slide"
|
||||||
borderRadius="rounded"
|
borderRadius="pill"
|
||||||
contentWidth="medium"
|
contentWidth="medium"
|
||||||
sizing="large"
|
sizing="mediumLarge"
|
||||||
background="aurora"
|
background="fluid"
|
||||||
cardStyle="inset"
|
cardStyle="soft-shadow"
|
||||||
primaryButtonStyle="primary-glow"
|
primaryButtonStyle="gradient"
|
||||||
secondaryButtonStyle="radial-glow"
|
secondaryButtonStyle="glass"
|
||||||
headingFontWeight="light"
|
headingFontWeight="bold"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
<div id="navbar" data-section="navbar">
|
<div id="navbar" data-section="navbar">
|
||||||
<NavbarStyleApple
|
<NavbarStyleApple
|
||||||
brandName="Hookah Haven"
|
brandName="MyCo"
|
||||||
navItems={[
|
navItems={[
|
||||||
{ name: "Головна", id: "/" },
|
{ name: "Home", id: "/" },
|
||||||
{ name: "Магазин", id: "/shop" }
|
{ name: "About", id: "/#about" },
|
||||||
|
{ name: "Features", id: "/#features" },
|
||||||
|
{ name: "Products", id: "/#products" },
|
||||||
|
{ name: "Testimonials", id: "/#testimonials" },
|
||||||
|
{ name: "FAQ", id: "/#faq" },
|
||||||
|
{ name: "Contact", id: "/#contact" },
|
||||||
|
{ name: "Blog", id: "/blog" },
|
||||||
|
{ name: "Shop", id: "/shop" }
|
||||||
]}
|
]}
|
||||||
button={{ text: "Кошик", onClick: () => setCartOpen(true) }}
|
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div id="product-detail-card" data-section="product-detail-card">
|
<div id="product-detail-card" data-section="product-detail-card">
|
||||||
@@ -210,8 +255,8 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
inventoryQuantity={meta.inventoryQuantity}
|
inventoryQuantity={meta.inventoryQuantity}
|
||||||
sku={meta.sku}
|
sku={meta.sku}
|
||||||
buttons={[
|
buttons={[
|
||||||
{ text: "Додати до кошика", onClick: handleAddToCart },
|
{ text: "Add to Cart", onClick: handleAddToCart },
|
||||||
{ text: "Купити зараз", onClick: handleBuyNow }
|
{ text: "Buy Now", onClick: handleBuyNow }
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -225,19 +270,31 @@ function ProductPageContent({ params }: ProductPageProps) {
|
|||||||
total={`$${cartTotal}`}
|
total={`$${cartTotal}`}
|
||||||
buttons={[
|
buttons={[
|
||||||
{
|
{
|
||||||
text: isCheckoutLoading ? "Обробка..." : "Оформити замовлення", onClick: handleCheckout,
|
text: isCheckoutLoading ? "Processing..." : "Checkout", onClick: handleCheckout,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div id="footer" data-section="footer">
|
<div id="footer" data-section="footer">
|
||||||
<FooterBaseCard
|
<FooterBaseCard
|
||||||
logoText="Hookah Haven"
|
logoText="MyCo"
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "Магазин", items: [{ label: "Кальяни", href: "#products" }, { label: "Тютюн", href: "#products" }, { label: "Вугілля", href: "#products" }, { label: "Аксесуари", href: "#products" }] },
|
{
|
||||||
{ title: "Компанія", items: [{ label: "Про нас", href: "#about" }, { label: "FAQ", href: "#faq" }, { label: "Контакти", href: "#contact" }] }
|
title: "Solutions", items: [
|
||||||
|
{ label: "Products", href: "/#products" },
|
||||||
|
{ label: "Features", href: "/#features" }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Company", items: [
|
||||||
|
{ label: "About Us", href: "/#about" },
|
||||||
|
{ label: "Blog", href: "/blog" },
|
||||||
|
{ label: "FAQ", href: "/#faq" },
|
||||||
|
{ label: "Contact", href: "/#contact" }
|
||||||
|
]
|
||||||
|
}
|
||||||
]}
|
]}
|
||||||
copyrightText="© 2024 Hookah Haven. Всі права захищені."
|
copyrightText="© 2024 MyCo. All rights reserved."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ReactLenis>
|
</ReactLenis>
|
||||||
|
|||||||
Reference in New Issue
Block a user