Switch to version 1: remove src/app/product/[id]/page.tsx
This commit is contained in:
@@ -1,131 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import ReactLenis from "lenis/react";
|
||||
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
|
||||
import FooterSimple from '@/components/sections/footer/FooterSimple';
|
||||
import { useParams } from 'next/navigation';
|
||||
import Image from 'next/image';
|
||||
|
||||
export default function ProductDetailPage() {
|
||||
const { id } = useParams();
|
||||
|
||||
// Placeholder product data (in a real app, this would be fetched from an API)
|
||||
const product = {
|
||||
id: id as string,
|
||||
name: "The Golden Wagyu Burger", description: "Our signature Golden Wagyu Burger features a premium Wagyu beef patty, infused with truffle oil, topped with caramelized onions, aged cheddar, and a delicate gold-dusted brioche bun. Served with a side of our exquisite truffle parmesan fries.", price: "$22.00", imageSrc: "http://img.b2bpic.net/free-photo/still-life-delicious-american-hamburger_23-2149637344.jpg", imageAlt: "The Golden Wagyu Burger", brand: "Elegance Eats", rating: 5,
|
||||
reviewCount: "245 reviews"
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="hover-magnetic"
|
||||
defaultTextAnimation="background-highlight"
|
||||
borderRadius="pill"
|
||||
contentWidth="compact"
|
||||
sizing="largeSmall"
|
||||
background="blurBottom"
|
||||
cardStyle="glass-depth"
|
||||
primaryButtonStyle="gradient"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="medium"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarLayoutFloatingInline
|
||||
navItems={[
|
||||
{
|
||||
name: "Home", id: "#hero"},
|
||||
{
|
||||
name: "Menu", id: "#menu"},
|
||||
{
|
||||
name: "About Us", id: "#about"},
|
||||
{
|
||||
name: "Testimonials", id: "#testimonials"},
|
||||
{
|
||||
name: "Contact", id: "#contact"},
|
||||
{
|
||||
name: "Cart", href: "/cart"}
|
||||
]}
|
||||
brandName="Elegance Eats"
|
||||
button={{
|
||||
text: "Order Now", href: "#menu"}}
|
||||
animateOnLoad={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="container mx-auto px-4 py-16 min-h-screen">
|
||||
<div className="flex flex-col md:flex-row gap-8">
|
||||
<div className="md:w-1/2">
|
||||
<Image
|
||||
src={product.imageSrc}
|
||||
alt={product.imageAlt}
|
||||
width={800}
|
||||
height={600}
|
||||
layout="responsive"
|
||||
className="rounded-lg shadow-lg"
|
||||
/>
|
||||
</div>
|
||||
<div className="md:w-1/2 space-y-6">
|
||||
<h1 className="text-5xl font-bold text-foreground">{product.name}</h1>
|
||||
<p className="text-2xl text-primary-cta font-semibold">{product.price}</p>
|
||||
<div className="flex items-center space-x-2">
|
||||
<div className="flex text-yellow-400">
|
||||
{Array(product.rating).fill(0).map((_, i) => (
|
||||
<svg key={i} className="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.538 1.118l-2.8-2.034a1 1 0 00-1.176 0l-2.8 2.034c-.783.57-1.838-.197-1.538-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.462a1 1 0 00.95-.69l1.07-3.292z"></path></svg>
|
||||
))}
|
||||
</div>
|
||||
<span className="text-sm text-foreground/70">({product.reviewCount})</span>
|
||||
</div>
|
||||
<p className="text-lg text-foreground/80 leading-relaxed">{product.description}</p>
|
||||
<button className="px-6 py-3 bg-primary-cta text-primary-cta-foreground rounded-full text-lg font-semibold hover:bg-primary-cta/90 transition-colors">
|
||||
Add to Cart
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterSimple
|
||||
columns={[
|
||||
{
|
||||
title: "Explore", items: [
|
||||
{
|
||||
label: "Menu", href: "#menu"},
|
||||
{
|
||||
label: "About Us", href: "#about"},
|
||||
{
|
||||
label: "Features", href: "#features"},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Support", items: [
|
||||
{
|
||||
label: "FAQ", href: "#faq"},
|
||||
{
|
||||
label: "Contact", href: "#contact"},
|
||||
{
|
||||
label: "Privacy Policy", href: "#"},
|
||||
{
|
||||
label: "Cart", href: "/cart"}
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Connect", items: [
|
||||
{
|
||||
label: "Instagram", href: "#"},
|
||||
{
|
||||
label: "Facebook", href: "#"},
|
||||
{
|
||||
label: "Twitter", href: "#"},
|
||||
],
|
||||
},
|
||||
]}
|
||||
bottomLeftText="© 2024 Elegance Eats. All rights reserved."
|
||||
bottomRightText="Crafted with passion, served with speed."
|
||||
/>
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user