From 6fc2dd70af88f7b9d585eade94deef6933e2428e Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Thu, 18 Sep 2025 20:53:25 +0700 Subject: [PATCH] feat: update regional list path --- app/[locale]/(public)/regional/filter/page.tsx | 5 +++++ components/landing-page/filter-all/audio-filter-card.tsx | 4 +++- components/landing-page/filter-all/document-filter-card.tsx | 4 +++- components/landing-page/filter-all/image-filter-card.tsx | 4 +++- components/landing-page/filter-all/video-filter-card.tsx | 5 +++-- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/[locale]/(public)/regional/filter/page.tsx b/app/[locale]/(public)/regional/filter/page.tsx index 06965b6b..9bd664da 100644 --- a/app/[locale]/(public)/regional/filter/page.tsx +++ b/app/[locale]/(public)/regional/filter/page.tsx @@ -713,6 +713,7 @@ export default function FilterPage() { startDateString={startDateString} endDateString={endDateString} monthYearFilter={monthYearFilter} + isRegionalCall={true} /> diff --git a/components/landing-page/filter-all/audio-filter-card.tsx b/components/landing-page/filter-all/audio-filter-card.tsx index fbe34477..b1140454 100644 --- a/components/landing-page/filter-all/audio-filter-card.tsx +++ b/components/landing-page/filter-all/audio-filter-card.tsx @@ -22,6 +22,7 @@ export default function FilterAudioComponent(props: { startDateString?: string; endDateString?: string; monthYearFilter?: any; + isRegionalCall?: any; }) { const { categoryFilter, @@ -29,6 +30,7 @@ export default function FilterAudioComponent(props: { startDateString, endDateString, monthYearFilter, + isRegionalCall, } = props; const [newContent, setNewContent] = useState(); const asPath = usePathname(); @@ -42,7 +44,7 @@ export default function FilterAudioComponent(props: { const categorie = searchParams?.get("category"); const group = searchParams?.get("group"); const [totalContent, setTotalContent] = useState(); - const isRegional = group || asPath.includes("/polda/"); + const isRegional = isRegionalCall || group || asPath.includes("/polda/"); const searchType = isRegional ? "regional" : "filter"; const router = useRouter(); const poldaName = params?.polda_name; diff --git a/components/landing-page/filter-all/document-filter-card.tsx b/components/landing-page/filter-all/document-filter-card.tsx index be4006f7..550a125f 100644 --- a/components/landing-page/filter-all/document-filter-card.tsx +++ b/components/landing-page/filter-all/document-filter-card.tsx @@ -22,6 +22,7 @@ export default function FilterDocumentComponent(props: { startDateString?: string; endDateString?: string; monthYearFilter?: any; + isRegionalCall?: any; }) { const { categoryFilter, @@ -29,6 +30,7 @@ export default function FilterDocumentComponent(props: { startDateString, endDateString, monthYearFilter, + isRegionalCall, } = props; const [newContent, setNewContent] = useState(); const asPath = usePathname(); @@ -42,7 +44,7 @@ export default function FilterDocumentComponent(props: { const categorie = searchParams?.get("category"); const group = searchParams?.get("group"); const [totalContent, setTotalContent] = useState(); - const isRegional = group || asPath.includes("/polda/"); + const isRegional = isRegionalCall || group || asPath.includes("/polda/"); const searchType = isRegional ? "regional" : "filter"; const router = useRouter(); diff --git a/components/landing-page/filter-all/image-filter-card.tsx b/components/landing-page/filter-all/image-filter-card.tsx index 40743fd7..adb9f7a2 100644 --- a/components/landing-page/filter-all/image-filter-card.tsx +++ b/components/landing-page/filter-all/image-filter-card.tsx @@ -21,6 +21,7 @@ export default function FilterImageComponent(props: { startDateString?: string; endDateString?: string; monthYearFilter?: any; + isRegionalCall?: any; }) { const { categoryFilter, @@ -28,6 +29,7 @@ export default function FilterImageComponent(props: { startDateString, endDateString, monthYearFilter, + isRegionalCall, } = props; const router = useRouter(); const [newContent, setNewContent] = useState(); @@ -43,7 +45,7 @@ export default function FilterImageComponent(props: { const [totalContent, setTotalContent] = useState(); const poldaName = params?.polda_name; const satkerName = params?.satker_name; - const isRegional = group || asPath.includes("/polda/"); + const isRegional = isRegionalCall || group || asPath.includes("/polda/"); const searchType = isRegional ? "regional" : "filter"; useEffect(() => { diff --git a/components/landing-page/filter-all/video-filter-card.tsx b/components/landing-page/filter-all/video-filter-card.tsx index abe8b5f1..5e5d415a 100644 --- a/components/landing-page/filter-all/video-filter-card.tsx +++ b/components/landing-page/filter-all/video-filter-card.tsx @@ -23,6 +23,7 @@ export default function FilterVideoComponent(props: { startDateString?: string; endDateString?: string; monthYearFilter?: any; + isRegionalCall?: any; }) { const { categoryFilter, @@ -30,6 +31,7 @@ export default function FilterVideoComponent(props: { startDateString, endDateString, monthYearFilter, + isRegionalCall, } = props; const [newContent, setNewContent] = useState(); const asPath = usePathname(); @@ -43,8 +45,7 @@ export default function FilterVideoComponent(props: { const categorie = searchParams?.get("category"); const group = searchParams?.get("group"); const [totalContent, setTotalContent] = useState(); - - const isRegional = group || asPath.includes("/polda/"); + const isRegional = isRegionalCall || group || asPath.includes("/polda/"); const searchType = isRegional ? "regional" : "filter"; const router = useRouter(); const poldaName = params?.polda_name;