diff options
author | 2025-05-29 20:57:31 +0530 | |
---|---|---|
committer | 2025-05-29 20:57:31 +0530 | |
commit | ca3ae0db6e8e3f2cf99423797c60f5c2cc66a780 (patch) | |
tree | f1d5fa2174283a811a5422cf148a96f435b461a6 /frontend/src/app/products | |
parent | a8fc4438ff1b890a78b7d2ba470011d8f87c6043 (diff) | |
download | blcklst-ca3ae0db6e8e3f2cf99423797c60f5c2cc66a780.tar.gz blcklst-ca3ae0db6e8e3f2cf99423797c60f5c2cc66a780.tar.bz2 blcklst-ca3ae0db6e8e3f2cf99423797c60f5c2cc66a780.zip |
feat: added the product page and enhanced the UI
- added the product page where the product details is shown
- enhanced the nav bar to handle the rendering
- added the loading screen to the page
- fixed the rendering method to the navigation-menu
Diffstat (limited to 'frontend/src/app/products')
-rw-r--r-- | frontend/src/app/products/[id]/page.tsx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/frontend/src/app/products/[id]/page.tsx b/frontend/src/app/products/[id]/page.tsx new file mode 100644 index 0000000..31ceded --- /dev/null +++ b/frontend/src/app/products/[id]/page.tsx @@ -0,0 +1,32 @@ +import { Header } from "@/components/header"; +import { Footer } from "@/components/footer"; +import { ProductPage } from "@/components/product-page"; + +interface ProductPageProps { + params: Promise<{ + id: string; + }>; +} + +export default async function Product({ params }: ProductPageProps) { + const { id } = await params; + + return ( + <> + <Header /> + <ProductPage productId={id} /> + <Footer /> + </> + ); +} + +export async function generateMetadata({ params }: ProductPageProps) { + // In a real app, you'd fetch the product data here based on params.id + const { id } = await params; + const productName = id === "1" ? "Oversized Cotton Hoodie" : "Product"; + + return { + title: `${productName} | blcklst`, + description: `Shop the ${productName} at blcklst. Premium quality fashion pieces that define modern elegance.`, + }; +}
\ No newline at end of file |