diff --git a/components/landing-page/content-category.tsx b/components/landing-page/content-category.tsx index 9fb80773..842b550f 100644 --- a/components/landing-page/content-category.tsx +++ b/components/landing-page/content-category.tsx @@ -8,6 +8,7 @@ import { usePathname } from "next/navigation"; import { useParams } from "next/navigation"; import Image from "next/image"; import { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious } from "../ui/carousel"; +import { useRouter } from "@/i18n/routing"; const ContentCategory = (props: { group?: string }) => { const [categories, setCategories] = useState(); @@ -16,6 +17,9 @@ const ContentCategory = (props: { group?: string }) => { const locale = params?.locale; const poldaName = params?.polda_name; const satkerName = params?.satker_name; + const router = useRouter(); + + let prefixPath = poldaName ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` : "/"; useEffect(() => { initFetch(); @@ -104,6 +108,14 @@ const ContentCategory = (props: { group?: string }) => { {seeAllValue ? t("seeLess") : t("seeMore")} */} +
+
router.push(prefixPath + `/${selectedTab}/filter?sortBy=${props.type}`)} + className="cursor-pointer border text-[#bb3523] rounded-lg text-sm lg:text-md px-4 py-1 border-[#bb3523]" + > + {t("seeAll")} +
+
);