added backend
This commit is contained in:
@@ -1,61 +1,16 @@
|
||||
interface features {
|
||||
key_uz: string;
|
||||
key_ru: string;
|
||||
value_uz: string;
|
||||
value_ru: string;
|
||||
}
|
||||
|
||||
export interface Product {
|
||||
id: string;
|
||||
nameKey: string;
|
||||
slug: string;
|
||||
shortDescriptionKey: string;
|
||||
longDescriptionKey?: string;
|
||||
images: string[];
|
||||
model3D?: string;
|
||||
specs: { key: string; value: string }[];
|
||||
}
|
||||
|
||||
// Sample products data
|
||||
export const products: Product[] = [
|
||||
{
|
||||
id: "1",
|
||||
nameKey: "Schotchik Nasos",
|
||||
slug: "Yuqori sifatli schotchik nasos, benzin, dizel va kerosinni tashishda ishlatiladi.",
|
||||
shortDescriptionKey: "Xavfsiz neft mahsulotlarini tashish uchun",
|
||||
images: ["/product/product.jpg", "/images/pump-1-alt.jpg"],
|
||||
specs: [
|
||||
{ key: "Flow Rate", value: "100 L/min" },
|
||||
{ key: "Pressure", value: "10 bar" },
|
||||
{ key: "Power", value: "5.5 kW" },
|
||||
{ key: "Temperature Range", value: "-10°C to 60°C" },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
nameKey: "Agregat Nasos",
|
||||
slug: "Katta volumli neft mahsulotlarini tashishda o'rnatilgan.",
|
||||
shortDescriptionKey: "Kuchli va ishonchli aggregat nasos",
|
||||
images: ["/product/product1.jpg", "/images/pump-2-alt.jpg"],
|
||||
specs: [
|
||||
{ key: "Flow Rate", value: "250 L/min" },
|
||||
{ key: "Pressure", value: "15 bar" },
|
||||
{ key: "Power", value: "11 kW" },
|
||||
{ key: "Temperature Range", value: "-10°C to 70°C" },
|
||||
],
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
nameKey: "СЦЛ 20/24",
|
||||
slug:"Chuqurligi 20-24 metrda ishlaydigan professional nasos.",
|
||||
shortDescriptionKey: "Professional kalibrli nasos",
|
||||
images: ["/product/product2.jpg", "/images/pump-3-alt.jpg"],
|
||||
specs: [
|
||||
{ key: "Depth Rating", value: "20-24 m" },
|
||||
{ key: "Flow Rate", value: "150 L/min" },
|
||||
{ key: "Suction Lift", value: "7 m" },
|
||||
{ key: "Power", value: "7.5 kW" },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export function getProductBySlug(slug: string): Product | undefined {
|
||||
return products.find((p) => p.slug === slug);
|
||||
}
|
||||
|
||||
export function getAllProducts(): Product[] {
|
||||
return products;
|
||||
id: number;
|
||||
name_uz: string;
|
||||
name_ru: string;
|
||||
description_uz: string;
|
||||
description_ru: string;
|
||||
features:features[];
|
||||
image:string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user