From 9cf5498c88a092469431fa507fa9ebce2b4a1f2c Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Fri, 19 Sep 2025 09:52:32 +0700 Subject: [PATCH] fix: link hred in image-filter-card --- .../filter-all/audio-filter-card.tsx | 13 +++++++------ .../filter-all/document-filter-card.tsx | 15 ++++++++------- .../filter-all/image-filter-card.tsx | 18 ++++++++++++------ .../filter-all/indeks-filter-card.tsx | 8 ++++---- .../filter-all/video-filter-card.tsx | 17 +++++++++-------- 5 files changed, 40 insertions(+), 31 deletions(-) diff --git a/components/landing-page/filter-all/audio-filter-card.tsx b/components/landing-page/filter-all/audio-filter-card.tsx index 10711b42..2737b197 100644 --- a/components/landing-page/filter-all/audio-filter-card.tsx +++ b/components/landing-page/filter-all/audio-filter-card.tsx @@ -54,7 +54,7 @@ export default function FilterAudioComponent(props: { ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` - : "/"; + : ""; useEffect(() => { if (searchType === "regional") { @@ -242,10 +242,11 @@ export default function FilterAudioComponent(props: { {newContent?.map((audio: any) => ( -
- router.push(prefixPath + `/audio/detail/${audio?.slug}`) - } + + // router.push(prefixPath + `/audio/detail/${audio?.slug}`) + // } className="cursor-pointer bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300 overflow-hidden" > {/* Icon Background */} @@ -273,7 +274,7 @@ export default function FilterAudioComponent(props: { {audio?.title}

- +
))}
diff --git a/components/landing-page/filter-all/document-filter-card.tsx b/components/landing-page/filter-all/document-filter-card.tsx index 82b74550..f15c8c5a 100644 --- a/components/landing-page/filter-all/document-filter-card.tsx +++ b/components/landing-page/filter-all/document-filter-card.tsx @@ -55,7 +55,7 @@ export default function FilterDocumentComponent(props: { ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` - : "/"; + : ""; useEffect(() => { if (searchType === "regional") { @@ -84,7 +84,7 @@ export default function FilterDocumentComponent(props: { categoryFilter?.length > 0 ? categoryFilter?.sort().join(",") : categorie || ""; - + const response = await listDataRegional( "3", search, @@ -213,10 +213,11 @@ export default function FilterDocumentComponent(props: { {newContent?.map((text: any) => ( -
- router.push(prefixPath + `/document/detail/${text?.slug}`) - } + + // router.push(prefixPath + `/document/detail/${text?.slug}`) + // } className="cursor-pointer rounded-lg shadow-md overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500" > {/* Ikon di tengah dengan latar kuning */} @@ -246,7 +247,7 @@ export default function FilterDocumentComponent(props: { {text?.title}
- +
))}
diff --git a/components/landing-page/filter-all/image-filter-card.tsx b/components/landing-page/filter-all/image-filter-card.tsx index 248b06d8..edc07601 100644 --- a/components/landing-page/filter-all/image-filter-card.tsx +++ b/components/landing-page/filter-all/image-filter-card.tsx @@ -157,11 +157,17 @@ 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}` + ? `/polda/${poldaName}/image/detail` : satkerName - ? `/satker/${satkerName}` - : "/"; + ? `/satker/${satkerName}/image/detail` + : `/image/detail`; return newContent?.length > 0 ? (
@@ -200,7 +206,7 @@ export default function FilterImageComponent(props: { {newContent?.map((image: any) => ( // router.push(prefixPath + `/image/detail/${image?.slug}`) // } @@ -212,7 +218,7 @@ export default function FilterImageComponent(props: { // whileHover={{ scale: 0.95 }} // transition={{ duration: 0.3 }} > - {image?.thumbnailLink && + {image?.thumbnailLink && ( - } + )}
{/* Badge category */} diff --git a/components/landing-page/filter-all/indeks-filter-card.tsx b/components/landing-page/filter-all/indeks-filter-card.tsx index c32f159d..febcc9fe 100644 --- a/components/landing-page/filter-all/indeks-filter-card.tsx +++ b/components/landing-page/filter-all/indeks-filter-card.tsx @@ -50,7 +50,7 @@ export default function IndeksCarouselComponent(props: { ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` - : "/"; + : ""; // useEffect(() => { // initFetch(); @@ -166,8 +166,8 @@ export default function IndeksCarouselComponent(props: { {newContent.map((image: any) => ( -
router.push(`/indeks/detail/${image?.slug}`)} + router.push(`/indeks/detail/${image?.slug}`)} className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300" >
@@ -193,7 +193,7 @@ export default function IndeksCarouselComponent(props: {

- +
))}
diff --git a/components/landing-page/filter-all/video-filter-card.tsx b/components/landing-page/filter-all/video-filter-card.tsx index 100ff296..0c748eb6 100644 --- a/components/landing-page/filter-all/video-filter-card.tsx +++ b/components/landing-page/filter-all/video-filter-card.tsx @@ -55,7 +55,7 @@ export default function FilterVideoComponent(props: { ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` - : "/"; + : ""; useEffect(() => { if (searchType === "regional") { @@ -160,10 +160,11 @@ export default function FilterVideoComponent(props: { {newContent?.map((video: any) => ( -
- router.push(prefixPath + `/video/detail/${video?.slug}`) - } + + // router.push(prefixPath + `/video/detail/${video?.slug}`) + // } className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300" > {/* Image with motion effect */} @@ -172,7 +173,7 @@ export default function FilterVideoComponent(props: { // whileHover={{ scale: 0.95 }} // transition={{ duration: 0.3 }} > - {video?.thumbnailLink && + {video?.thumbnailLink && ( - } + )}
{/* Badge category */} @@ -226,7 +227,7 @@ export default function FilterVideoComponent(props: {

*/} - +
))}