diff --git a/components/landing-page/content-category.tsx b/components/landing-page/content-category.tsx index c8e072ab..db12a546 100644 --- a/components/landing-page/content-category.tsx +++ b/components/landing-page/content-category.tsx @@ -1,7 +1,4 @@ -import { - getCategoryData, - getPublicCategoryData, -} from "@/service/landing/landing"; +import { getCategoryData, getPublicCategoryData } from "@/service/landing/landing"; import Link from "next/link"; import React, { useEffect, useState } from "react"; import { Button } from "../ui/button"; @@ -24,15 +21,7 @@ const ContentCategory = (props: { group?: string }) => { }, []); const initFetch = async () => { const response = await getPublicCategoryData( - props.group == "mabes" - ? "" - : props.group == "polda" && poldaName && String(poldaName)?.length > 1 - ? poldaName - : props.group == "satker" && - satkerName && - String(satkerName)?.length > 1 - ? "satker-" + satkerName - : "", + props.group == "mabes" ? "" : props.group == "polda" && poldaName && String(poldaName)?.length > 1 ? poldaName : props.group == "satker" && satkerName && String(satkerName)?.length > 1 ? "satker-" + satkerName : "", "", locale == "en" ? true : false ); @@ -58,10 +47,7 @@ const ContentCategory = (props: { group?: string }) => { `; - const toBase64 = (str: string) => - typeof window === "undefined" - ? Buffer.from(str).toString("base64") - : window.btoa(str); + const toBase64 = (str: string) => (typeof window === "undefined" ? Buffer.from(str).toString("base64") : window.btoa(str)); return (
@@ -85,29 +71,10 @@ const ContentCategory = (props: { group?: string }) => { {categories?.map((category: any, index: number) => !seeAllValue ? ( index < 4 ? ( - // - // category - //
- //

{category?.name}

- //
- // - + {/* Gambar */} category { {/* Judul */}
-

- {category?.name} -

+

{category?.name}

) : ( "" ) ) : ( - // - // category - //
- //

{category?.name}

- //
- // - + {/* Gambar */} category { {/* Judul */}
-

- {category?.name} -

+

{category?.name}

) )}
-