109 lines
3.6 KiB
TypeScript
109 lines
3.6 KiB
TypeScript
"use client";
|
|
|
|
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
|
import ReactLenis from "lenis/react";
|
|
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
|
import FooterBase from '@/components/sections/footer/FooterBase';
|
|
import ProductCardTwo from '@/components/sections/product/ProductCardTwo';
|
|
|
|
const generateProducts = (count: number) => {
|
|
const products = [];
|
|
for (let i = 1; i <= count; i++) {
|
|
products.push({
|
|
id: `product-${i}`,
|
|
brand: `Brand ${Math.ceil(i / 10)}`,
|
|
name: `Ajoyib Mahsulot ${i}`,
|
|
price: `${(Math.random() * 500 + 50).toFixed(0)},000 so'm`,
|
|
rating: Math.floor(Math.random() * 3) + 3, // Ratings between 3 and 5
|
|
reviewCount: `${Math.floor(Math.random() * 200) + 10} ta sharh`,
|
|
imageSrc: `http://img.b2bpic.net/free-photo/product-${(i % 10) + 1}.jpg`, // Cycle through 10 generic product images
|
|
imageAlt: `Ajoyib Mahsulot ${i} tasviri`,
|
|
});
|
|
}
|
|
return products;
|
|
};
|
|
|
|
const allProducts = generateProducts(55); // 50+ products
|
|
|
|
export default function ProductsPage() {
|
|
const navItems = [
|
|
{ name: "Bosh sahifa", id: "/" },
|
|
{ name: "Biz haqimizda", id: "/about" },
|
|
{ name: "Katalog", id: "/catalog" },
|
|
{ name: "Mahsulotlar", id: "/products" }, // Link to this page
|
|
{ name: "Bog'lanish", id: "/contact" },
|
|
];
|
|
|
|
const footerColumns = [
|
|
{
|
|
title: "Kompaniya", items: [
|
|
{ label: "Biz haqimizda", href: "/about" },
|
|
{ label: "Bog'lanish", href: "/contact" },
|
|
{ label: "Katalog", href: "/catalog" },
|
|
{ label: "Mahsulotlar", href: "/products" },
|
|
],
|
|
},
|
|
{
|
|
title: "Yordam", items: [
|
|
{ label: "FAQ", href: "/faq" },
|
|
{ label: "Yetkazib berish", href: "#" },
|
|
{ label: "To'lov usullari", href: "#" },
|
|
],
|
|
},
|
|
{
|
|
title: "Qonuniy", items: [
|
|
{ label: "Maxfiylik siyosati", href: "#" },
|
|
{ label: "Xizmat ko'rsatish shartlari", href: "#" },
|
|
],
|
|
},
|
|
];
|
|
|
|
return (
|
|
<ThemeProvider
|
|
defaultButtonVariant="shift-hover"
|
|
defaultTextAnimation="reveal-blur"
|
|
borderRadius="soft"
|
|
contentWidth="small"
|
|
sizing="mediumLargeSizeMediumTitles"
|
|
background="grid"
|
|
cardStyle="inset"
|
|
primaryButtonStyle="radial-glow"
|
|
secondaryButtonStyle="glass"
|
|
headingFontWeight="bold"
|
|
>
|
|
<ReactLenis root>
|
|
<div id="nav" data-section="nav">
|
|
<NavbarStyleFullscreen
|
|
navItems={navItems}
|
|
logoSrc="http://img.b2bpic.net/free-photo/cyber-monday-celebration_23-2151835475.jpg"
|
|
logoAlt="Opto Go logo"
|
|
brandName="Opto Go"
|
|
/>
|
|
</div>
|
|
|
|
<div id="products-catalog" data-section="products-catalog">
|
|
<ProductCardTwo
|
|
animationType="slide-up"
|
|
textboxLayout="default"
|
|
gridVariant="four-items-2x2-equal-grid"
|
|
useInvertedBackground={false}
|
|
title="Bizning Mahsulotlar Katalogimiz"
|
|
description="Opto Go'ning keng mahsulotlar assortimentida o'zingizga kerakli narsani toping. Bizda 50 dan ortiq turdagi mahsulotlar mavjud!"
|
|
products={allProducts}
|
|
/>
|
|
</div>
|
|
|
|
<div id="footer" data-section="footer">
|
|
<FooterBase
|
|
columns={footerColumns}
|
|
logoSrc="http://img.b2bpic.net/free-photo/cyber-monday-celebration_23-2151835475.jpg"
|
|
logoAlt="Opto Go logo"
|
|
logoText="Opto Go"
|
|
copyrightText="© 2024 Opto Go. Barcha huquqlar himoyalangan."
|
|
/>
|
|
</div>
|
|
</ReactLenis>
|
|
</ThemeProvider>
|
|
);
|
|
}
|