new images
This commit is contained in:
@@ -4,48 +4,16 @@ import React, { useEffect, useState } from "react";
|
|||||||
import Title from "../lib_components/title";
|
import Title from "../lib_components/title";
|
||||||
import Text from "../lib_components/text";
|
import Text from "../lib_components/text";
|
||||||
import { Asphalt, Ekskavator, Forklift, Kran, Truck } from "@/assets";
|
import { Asphalt, Ekskavator, Forklift, Kran, Truck } from "@/assets";
|
||||||
import Image from "next/image";
|
|
||||||
import type { productFilterTypes, ProductTypes } from "@/types";
|
import type { productFilterTypes, ProductTypes } from "@/types";
|
||||||
import {
|
import {
|
||||||
allProducts,
|
allProducts,
|
||||||
cranes,
|
|
||||||
excavators,
|
|
||||||
forklift,
|
|
||||||
road_repairs,
|
|
||||||
trucks,
|
|
||||||
} from "@/data";
|
} from "@/data";
|
||||||
import ProductCard from "../cards/productCard";
|
import ProductCard from "../cards/productCard";
|
||||||
|
|
||||||
const productFilterTypesMainPage: productFilterTypes[] = [
|
|
||||||
{ name: "trucks", image: Truck },
|
|
||||||
{ name: "cranes", image: Kran },
|
|
||||||
{ name: "forklift-trucks", image: Ekskavator },
|
|
||||||
{ name: "excavators", image: Forklift },
|
|
||||||
{ name: "road-repairs", image: Asphalt },
|
|
||||||
{ name: "all", image: "" },
|
|
||||||
];
|
|
||||||
|
|
||||||
export default function Products() {
|
export default function Products() {
|
||||||
//const [productFilter, setProductFilter] = useState<string | null>(null);
|
|
||||||
|
|
||||||
const [cars, setCars] = useState(allProducts);
|
const [cars, setCars] = useState(allProducts);
|
||||||
|
|
||||||
// execute filetr function
|
|
||||||
// useEffect(() => {
|
|
||||||
// if (productFilter === "trucks") {
|
|
||||||
// setCars(trucks);
|
|
||||||
// } else if (productFilter === "cranes") {
|
|
||||||
// setCars(cranes);
|
|
||||||
// } else if (productFilter === "forklift-trucks") {
|
|
||||||
// setCars(forklift);
|
|
||||||
// } else if (productFilter === "excavators") {
|
|
||||||
// setCars(excavators);
|
|
||||||
// } else if (productFilter === "road-repairs") {
|
|
||||||
// setCars(road_repairs);
|
|
||||||
// } else {
|
|
||||||
// setCars(allProducts);
|
|
||||||
// }
|
|
||||||
// }, [productFilter]);
|
|
||||||
return (
|
return (
|
||||||
<div dir="ltr" className="max-w-[1200px] w-full mx-auto">
|
<div dir="ltr" className="max-w-[1200px] w-full mx-auto">
|
||||||
{/* title part */}
|
{/* title part */}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import {
|
|||||||
Avtovishka60,
|
Avtovishka60,
|
||||||
Avtovishka75,
|
Avtovishka75,
|
||||||
Avtovishka_card,
|
Avtovishka_card,
|
||||||
Balon,
|
|
||||||
Balon1,
|
Balon1,
|
||||||
Balon2,
|
Balon2,
|
||||||
Balon_card,
|
Balon_card,
|
||||||
@@ -23,12 +22,10 @@ import {
|
|||||||
Buldozer1,
|
Buldozer1,
|
||||||
Buldozer2,
|
Buldozer2,
|
||||||
Chakman2,
|
Chakman2,
|
||||||
Digger,
|
|
||||||
Digger1,
|
Digger1,
|
||||||
Digger2,
|
Digger2,
|
||||||
Eks_yuk_card,
|
Eks_yuk_card,
|
||||||
ekskavatorSlider,
|
ekskavatorSlider,
|
||||||
Evakuator,
|
|
||||||
Evakuator20,
|
Evakuator20,
|
||||||
Evakuator5,
|
Evakuator5,
|
||||||
Evakuator_card,
|
Evakuator_card,
|
||||||
@@ -36,17 +33,14 @@ import {
|
|||||||
Fork1,
|
Fork1,
|
||||||
Fork2,
|
Fork2,
|
||||||
Fork3,
|
Fork3,
|
||||||
Forkliftlar,
|
|
||||||
Gazel2,
|
Gazel2,
|
||||||
Gazel5,
|
Gazel5,
|
||||||
Grayder,
|
|
||||||
Grayder1,
|
Grayder1,
|
||||||
Howo1,
|
Howo1,
|
||||||
Howo2_1,
|
Howo2_1,
|
||||||
Howo3_1,
|
Howo3_1,
|
||||||
Isuzu2,
|
Isuzu2,
|
||||||
Kaimei1,
|
Kaimei1,
|
||||||
Kat,
|
|
||||||
Katok10,
|
Katok10,
|
||||||
Katok20,
|
Katok20,
|
||||||
Katok3,
|
Katok3,
|
||||||
@@ -54,16 +48,12 @@ import {
|
|||||||
Katok6,
|
Katok6,
|
||||||
Katok_card,
|
Katok_card,
|
||||||
kompressorSlider,
|
kompressorSlider,
|
||||||
Kran1,
|
|
||||||
Kran130,
|
Kran130,
|
||||||
Kran2,
|
Kran2,
|
||||||
Kran30,
|
Kran30,
|
||||||
Kran4,
|
|
||||||
Kran50,
|
Kran50,
|
||||||
Kran75,
|
Kran75,
|
||||||
Kran_card,
|
Kran_card,
|
||||||
Kranmexanik1,
|
|
||||||
Kranminora1,
|
|
||||||
Manipulyator,
|
Manipulyator,
|
||||||
Manipulyator_card,
|
Manipulyator_card,
|
||||||
Mikser,
|
Mikser,
|
||||||
@@ -71,12 +61,6 @@ import {
|
|||||||
Mini1,
|
Mini1,
|
||||||
Mini2,
|
Mini2,
|
||||||
Mini_yuk_card,
|
Mini_yuk_card,
|
||||||
Minora1,
|
|
||||||
Minora4,
|
|
||||||
Old,
|
|
||||||
Old1,
|
|
||||||
Old2,
|
|
||||||
Old3,
|
|
||||||
Old_card,
|
Old_card,
|
||||||
Old_yuklagich_3,
|
Old_yuklagich_3,
|
||||||
Old_yuklagich_biru8,
|
Old_yuklagich_biru8,
|
||||||
@@ -96,7 +80,6 @@ import {
|
|||||||
Tel4,
|
Tel4,
|
||||||
Teleskop,
|
Teleskop,
|
||||||
Traller,
|
Traller,
|
||||||
Treyler,
|
|
||||||
Treyler1,
|
Treyler1,
|
||||||
Treyler2,
|
Treyler2,
|
||||||
Treyler6,
|
Treyler6,
|
||||||
|
|||||||
Reference in New Issue
Block a user