slider component updated

This commit is contained in:
nabijonovdavronbek619@gmail.com
2026-04-28 11:29:06 +05:00
parent cfa84d04ab
commit 77c6baaa55
25 changed files with 1308 additions and 1770 deletions

View File

@@ -6,12 +6,22 @@ import Link from "next/link";
import Text from "../lib_components/text";
import { motion } from "framer-motion";
import { useParams } from "next/navigation";
import { useSubCategory } from "@/store/subCategory";
export default function SliderCard({ data }: { data: ProductTypes }) {
const router = useParams();
const setInitialSubcategory = useSubCategory(
(state) => state.setInitialSubCategory,
);
return (
<Link
href={`/${router.lang}/${data.path}`}
href={`/${router.lang}/${data.id}`}
onClick={() => {
setInitialSubcategory({
name:data.truck_name,
id: data.id,
});
}}
id="news_slider_card"
className="group hover:cursor-pointer block"
>