new car added and added some new features to header location icon and again added show case section
This commit is contained in:
@@ -26,30 +26,30 @@ const productFilterTypesMainPage: productFilterTypes[] = [
|
||||
];
|
||||
|
||||
export default function Products() {
|
||||
const [productFilter, setProductFilter] = useState<string | null>(null);
|
||||
//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]);
|
||||
// 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 */}
|
||||
<div className="flex flex-col">
|
||||
<div className="flex flex-col mb-10">
|
||||
<div className="flex items-center justify-center w-full ">
|
||||
<div className="text-secondary px-2 text-[18px] font-semibold ">
|
||||
<Text txt="katalog" />
|
||||
@@ -59,7 +59,7 @@ export default function Products() {
|
||||
</div>
|
||||
|
||||
{/* product filters */}
|
||||
<div className="flex flex-wrap gap-1 gap-y-4 items-center justify-center mb-10 ">
|
||||
{/* <div className="flex flex-wrap gap-1 gap-y-4 items-center justify-center mb-10 ">
|
||||
{productFilterTypesMainPage.map((item, index) => (
|
||||
<button
|
||||
key={index}
|
||||
@@ -80,7 +80,7 @@ export default function Products() {
|
||||
)}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
{/* products */}
|
||||
<div className="px-4 grid gap-5 grid-cols-1 place-content-center min-[500px]:grid-cols-2 min-lg:grid-cols-4 min-[1210px]:grid-cols-4">
|
||||
|
||||
Reference in New Issue
Block a user