new images
This commit is contained in:
@@ -4,48 +4,16 @@ import React, { useEffect, useState } from "react";
|
||||
import Title from "../lib_components/title";
|
||||
import Text from "../lib_components/text";
|
||||
import { Asphalt, Ekskavator, Forklift, Kran, Truck } from "@/assets";
|
||||
import Image from "next/image";
|
||||
import type { productFilterTypes, ProductTypes } from "@/types";
|
||||
import {
|
||||
allProducts,
|
||||
cranes,
|
||||
excavators,
|
||||
forklift,
|
||||
road_repairs,
|
||||
trucks,
|
||||
} from "@/data";
|
||||
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() {
|
||||
//const [productFilter, setProductFilter] = useState<string | null>(null);
|
||||
|
||||
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 (
|
||||
<div dir="ltr" className="max-w-[1200px] w-full mx-auto">
|
||||
{/* title part */}
|
||||
|
||||
Reference in New Issue
Block a user