From 683c4cc4657c95d31a88e51f35dc20ef4b589bb3 Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Fri, 19 Sep 2025 13:57:06 +0700 Subject: [PATCH] fix: href link in card filter --- .../landing-page/filter-all/audio-filter-card.tsx | 3 ++- .../filter-all/document-filter-card.tsx | 3 ++- .../landing-page/filter-all/image-filter-card.tsx | 14 ++++---------- .../landing-page/filter-all/video-filter-card.tsx | 3 ++- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/components/landing-page/filter-all/audio-filter-card.tsx b/components/landing-page/filter-all/audio-filter-card.tsx index 2737b197..87cc1567 100644 --- a/components/landing-page/filter-all/audio-filter-card.tsx +++ b/components/landing-page/filter-all/audio-filter-card.tsx @@ -243,7 +243,8 @@ export default function FilterAudioComponent(props: { {newContent?.map((audio: any) => ( // router.push(prefixPath + `/audio/detail/${audio?.slug}`) // } diff --git a/components/landing-page/filter-all/document-filter-card.tsx b/components/landing-page/filter-all/document-filter-card.tsx index f15c8c5a..14315f49 100644 --- a/components/landing-page/filter-all/document-filter-card.tsx +++ b/components/landing-page/filter-all/document-filter-card.tsx @@ -214,7 +214,8 @@ export default function FilterDocumentComponent(props: { {newContent?.map((text: any) => ( // router.push(prefixPath + `/document/detail/${text?.slug}`) // } diff --git a/components/landing-page/filter-all/image-filter-card.tsx b/components/landing-page/filter-all/image-filter-card.tsx index edc07601..111b6d74 100644 --- a/components/landing-page/filter-all/image-filter-card.tsx +++ b/components/landing-page/filter-all/image-filter-card.tsx @@ -157,17 +157,11 @@ export default function FilterImageComponent(props: { }${endDateString ? `&endDate=${endDateString}` : ""}`; const href = `${basePath}/image/${fullQuery}`; - // let prefixPath = poldaName - // ? `/polda/${poldaName}` - // : satkerName - // ? `/satker/${satkerName}` - // : ""; - let prefixPath = poldaName - ? `/polda/${poldaName}/image/detail` + ? `/polda/${poldaName}` : satkerName - ? `/satker/${satkerName}/image/detail` - : `/image/detail`; + ? `/satker/${satkerName}` + : ""; return newContent?.length > 0 ? (
@@ -206,7 +200,7 @@ export default function FilterImageComponent(props: { {newContent?.map((image: any) => ( // router.push(prefixPath + `/image/detail/${image?.slug}`) // } diff --git a/components/landing-page/filter-all/video-filter-card.tsx b/components/landing-page/filter-all/video-filter-card.tsx index 0c748eb6..3f669f72 100644 --- a/components/landing-page/filter-all/video-filter-card.tsx +++ b/components/landing-page/filter-all/video-filter-card.tsx @@ -161,7 +161,8 @@ export default function FilterVideoComponent(props: { {newContent?.map((video: any) => ( // router.push(prefixPath + `/video/detail/${video?.slug}`) // }