diff --git a/components/landing-page/filter-all/video-filter-card.tsx b/components/landing-page/filter-all/video-filter-card.tsx
index abe8b5f1..100ff296 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;
@@ -78,10 +79,16 @@ export default function FilterVideoComponent(props: {
let endDateFilter = endDateString ? endDateString : "";
let monthFilter = monthYearFilter ? monthYearFilter : "";
+ const search = title == undefined ? "" : title;
+ const filter =
+ categoryFilter?.length > 0
+ ? categoryFilter?.sort().join(",")
+ : categorie || "";
+
const response = await listDataRegional(
"2",
- "",
- "",
+ search,
+ filter,
"",
"",
startDateFilter,
@@ -95,7 +102,8 @@ export default function FilterVideoComponent(props: {
const contentData = data?.content;
setNewContent(contentData);
setTotalData(data?.totalElements);
- // setLoading(false);
+ setTotalPage(data?.totalPages);
+ setTotalContent(data?.totalElements);
}
async function getDataAll() {
@@ -164,17 +172,19 @@ export default function FilterVideoComponent(props: {
// whileHover={{ scale: 0.95 }}
// transition={{ duration: 0.3 }}
>
-
+ {video?.thumbnailLink &&
+
+ }
{/* Badge category */}