-
- {t("categoryReg")}
-
-
- {t("selectOne")}
-
+
{t("categoryReg")}
+
{t("selectOne")}
-
+
{t("next")}{" "}
diff --git a/components/landing-page/new-content.tsx b/components/landing-page/new-content.tsx
index 7d534c13..e4f782ce 100644
--- a/components/landing-page/new-content.tsx
+++ b/components/landing-page/new-content.tsx
@@ -92,9 +92,9 @@ const NewContent = (props: { group: string; type: string }) => {
const toBase64 = (str: string) => (typeof window === "undefined" ? Buffer.from(str).toString("base64") : window.btoa(str));
return (
-
+
-
+
{pathname?.split("/")[1] == "in" ? (
<>
@@ -194,8 +194,8 @@ const NewContent = (props: { group: string; type: string }) => {
))}
-
-
+
+
) : (
@@ -241,8 +241,8 @@ const NewContent = (props: { group: string; type: string }) => {
))}
-
-
+
+
) : (
@@ -300,8 +300,8 @@ const NewContent = (props: { group: string; type: string }) => {
))}
-
-
+
+
) : (
@@ -364,8 +364,8 @@ const NewContent = (props: { group: string; type: string }) => {
))}
-
-
+
+
) : (
diff --git a/components/landing-page/polda-logo.tsx b/components/landing-page/polda-logo.tsx
new file mode 100644
index 00000000..7ebd5434
--- /dev/null
+++ b/components/landing-page/polda-logo.tsx
@@ -0,0 +1,55 @@
+"use client";
+
+import Image from "next/image";
+import { useParams } from "next/navigation";
+
+const regions = [
+ { name: "Polda Aceh", slug: "aceh", logo: "/logo/polda/polda-aceh.png" },
+ { name: "Polda Bali", slug: "bali", logo: "/logo/polda/polda-bali.png" },
+ { name: "Polda Bangka Belitung", slug: "bangka-belitung", logo: "/logo/polda/polda-bangkabelitung.png" },
+ { name: "Polda Banten", slug: "banten", logo: "/logo/polda/polda-banten.png" },
+ { name: "Polda Bengkulu", slug: "bengkulu", logo: "/logo/polda/polda-bengkulu.png" },
+ { name: "Polda DIY", slug: "di-yogyakarta", logo: "/logo/polda/polda-jogja.png" },
+ { name: "Polda Gorontalo", slug: "gorontalo", logo: "/logo/polda/polda-gorontalo.png" },
+ { name: "Polda Jambi", slug: "jambi", logo: "/logo/polda/polda-jambi.png" },
+ { name: "Polda Jawa Barat", slug: "jawa-barat", logo: "/logo/polda/polda-jawabarat.png" },
+ { name: "Polda Jawa Tengah", slug: "jawa-tengah", logo: "/logo/polda/polda-jawatengah.png" },
+ { name: "Polda Jawa Timur", slug: "jawa-timur", logo: "/logo/polda/polda-jawatimur.png" },
+ { name: "Polda Kalimantan Barat", slug: "kalimantan-barat", logo: "/logo/polda/polda-kalbar.png" },
+ { name: "Polda Kalimantan Selatan", slug: "kalimantan-selatan", logo: "/logo/polda/polda-kalsel.png" },
+ { name: "Polda Kalimantan Tengah", slug: "kalimantan-tengah", logo: "/logo/polda/polda-kalteng.png" },
+ { name: "Polda Kalimantan Timur", slug: "kalimantan-timur", logo: "/logo/polda/polda-kaltim.png" },
+ { name: "Polda Kalimantan Utara", slug: "kaltara", logo: "/logo/polda/polda-kaltara.png" },
+ { name: "Polda Kepulauan Riau", slug: "kepulauan-riau", logo: "/logo/polda/polda-kepri.png" },
+ { name: "Polda Lampung", slug: "lampung", logo: "/logo/polda/polda-lampung.png" },
+ { name: "Polda Maluku", slug: "maluku", logo: "/logo/polda/polda-maluku.png" },
+ { name: "Polda Maluku Utara", slug: "maluku-utara", logo: "/logo/polda/polda-maluku-utara.png" },
+ { name: "Polda Metro Jaya", slug: "metro-jaya", logo: "/logo/polda/polda-metro.png" },
+ { name: "Polda NTB", slug: "ntb", logo: "/logo/polda/polda-ntb.png" },
+ { name: "Polda NTT", slug: "ntt", logo: "/logo/polda/polda-ntt.png" },
+ { name: "Polda Papua", slug: "papua", logo: "/logo/polda/polda-papua.png" },
+ { name: "Polda Papua Barat", slug: "papua-barat", logo: "/logo/polda/polda-papua-barat.png" },
+ { name: "Polda Riau", slug: "riau", logo: "/logo/polda/polda-riau.png" },
+ { name: "Polda Sulawesi Barat", slug: "sulawesi-barat", logo: "/logo/polda/polda-sulbar.png" },
+ { name: "Polda Sulawesi Selatan", slug: "sulawesi-selatan", logo: "/logo/polda/polda-sulsel.png" },
+ { name: "Polda Sulawesi Tengah", slug: "sulawesi-tengah", logo: "/logo/polda/polda-sulawesi-tengah.png" },
+ { name: "Polda Sulawesi Tenggara", slug: "sulawesi-tenggara", logo: "/logo/polda/polda-sulawesi-tenggara.png" },
+ { name: "Polda Sulawesi Utara", slug: "sulawesi-utara", logo: "/logo/polda/polda-sulawesi-utara.png" },
+ { name: "Polda Sumatera Barat", slug: "sumatera-barat", logo: "/logo/polda/polda-sumatera-barat.png" },
+ { name: "Polda Sumatera Selatan", slug: "sumatera-selatan", logo: "/logo/polda/polda-sumsel.png" },
+ { name: "Polda Sumatera Utara", slug: "sumatera-utara", logo: "/logo/polda/polda-sumut.png" },
+];
+
+export default function PoldaLogo() {
+ const params = useParams();
+ const poldaSlug = params?.slug ?? ""; // pastikan kamu di route [slug] atau [poldaSlug]
+
+ const region = regions.find((r) => r.slug === poldaSlug);
+ const logoSrc = region?.logo ?? "/logo/polda/default.png";
+
+ return (
+
+
+
+ );
+}
diff --git a/components/landing-page/scrollable-content-polda.tsx b/components/landing-page/scrollable-content-polda.tsx
index 04e85cec..42df5e59 100644
--- a/components/landing-page/scrollable-content-polda.tsx
+++ b/components/landing-page/scrollable-content-polda.tsx
@@ -54,15 +54,17 @@ const ScrollableContentPolda = () => {
- {t("welcome")} DI POLDA {poldaName?.replace("-", " ")}
+ {t("welcome")} Polda {poldaName?.replace("-", " ")}
-
+ {/*
{t("download")} {t("coverage")}
- {" "}
+ {" "} */}
-
{t("officialCoverage")}
+
+ {t("officialPolda")} {poldaName?.replace("-", " ")}
+
diff --git a/components/landing-page/scrollable-content-satker.tsx b/components/landing-page/scrollable-content-satker.tsx
new file mode 100644
index 00000000..5e5f0ad0
--- /dev/null
+++ b/components/landing-page/scrollable-content-satker.tsx
@@ -0,0 +1,115 @@
+import search from "@/app/[locale]/(protected)/app/chat/components/search";
+import { useTranslations } from "next-intl";
+import { useParams, useRouter } from "next/navigation";
+import router from "next/router";
+import React, { useEffect, useState } from "react";
+import { Icon } from "@iconify/react/dist/iconify.js";
+import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../ui/select";
+import Image from "next/image";
+import { getHeroData } from "@/service/landing/landing";
+import { title } from "process";
+import { htmlToString } from "@/utils/globals";
+import { Link } from "@/i18n/routing";
+
+const ScrollableContentSatker = () => {
+ const [contentType, setContentType] = useState("all");
+ const [search, setSearch] = useState("");
+ const router = useRouter();
+ const params = useParams();
+ const locale = params?.locale;
+ const t = useTranslations("LandingPage");
+ const satkerName: any = params?.satker_name;
+ const [content, setContent] = useState
();
+ useEffect(() => {
+ async function fetchCategories() {
+ const url = "https://netidhub.com/api/csrf";
+
+ try {
+ const response = await fetch(url);
+
+ if (!response.ok) {
+ throw new Error(`HTTP error! status: ${response.status}`);
+ }
+
+ const data = await response.json();
+ return data;
+ } catch (error) {
+ console.error("Fetch error: ", error);
+ }
+ }
+
+ fetchCategories();
+ initFetch();
+ }, []);
+
+ const initFetch = async () => {
+ const response = await getHeroData();
+ console.log(response);
+ let data = response?.data?.data?.content;
+
+ setContent(data);
+ };
+ return (
+ <>
+
+
+
+ {t("welcome")} Polda {satkerName?.replace("-", " ")}
+
+ {/*
+ {t("download")} {t("coverage")}
+ {" "} */}
+
+
+
+
+ {t("officialPolda")} {satkerName?.replace("-", " ")}
+
+
+
+
+
+
+
+
+
+
setSearch(e.target.value)} />
+
+
+
+
+
+ >
+ );
+};
+
+export default ScrollableContentSatker;
diff --git a/components/landing-page/search-section-polda.tsx b/components/landing-page/search-section-polda.tsx
new file mode 100644
index 00000000..399333e7
--- /dev/null
+++ b/components/landing-page/search-section-polda.tsx
@@ -0,0 +1,58 @@
+import search from "@/app/[locale]/(protected)/app/chat/components/search";
+import { Select, SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectItem } from "@radix-ui/react-select";
+import { Icon } from "lucide-react";
+import { useTranslations } from "next-intl";
+import { useRouter } from "next/navigation";
+import router from "next/router";
+import React, { useState } from "react";
+import ScrollableContent from "./search-section-new";
+import NewContent from "./new-content";
+import ContentCategory from "./content-category";
+import AreaCoverageWorkUnits from "./area-coverage-and-work-units";
+import EventCalender from "./event-calender";
+import UserSurveyBox from "./survey-box";
+import ScrollableContentPolda from "./scrollable-content-polda";
+
+const LeftBanner = () => (
+
+

+

+
+);
+
+const RightBanner = () => (
+
+

+

+
+);
+
+const SearchSectionPolda = () => {
+ const [contentType, setContentType] = useState("all");
+ const [search, setSearch] = useState("");
+ const router = useRouter();
+ const t = useTranslations("LandingPage");
+ return (
+
+ );
+};
+
+export default SearchSectionPolda;
diff --git a/components/landing-page/search-section-satker.tsx b/components/landing-page/search-section-satker.tsx
new file mode 100644
index 00000000..9d24a8a3
--- /dev/null
+++ b/components/landing-page/search-section-satker.tsx
@@ -0,0 +1,59 @@
+import search from "@/app/[locale]/(protected)/app/chat/components/search";
+import { Select, SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectItem } from "@radix-ui/react-select";
+import { Icon } from "lucide-react";
+import { useTranslations } from "next-intl";
+import { useRouter } from "next/navigation";
+import router from "next/router";
+import React, { useState } from "react";
+import ScrollableContent from "./search-section-new";
+import NewContent from "./new-content";
+import ContentCategory from "./content-category";
+import AreaCoverageWorkUnits from "./area-coverage-and-work-units";
+import EventCalender from "./event-calender";
+import UserSurveyBox from "./survey-box";
+import ScrollableContentPolda from "./scrollable-content-polda";
+import ScrollableContentSatker from "./scrollable-content-satker";
+
+const LeftBanner = () => (
+
+

+

+
+);
+
+const RightBanner = () => (
+
+

+

+
+);
+
+const SearchSectionSatker = () => {
+ const [contentType, setContentType] = useState("all");
+ const [search, setSearch] = useState("");
+ const router = useRouter();
+ const t = useTranslations("LandingPage");
+ return (
+
+ );
+};
+
+export default SearchSectionSatker;
diff --git a/components/landing-page/search-section.tsx b/components/landing-page/search-section.tsx
index 6ae4e6c1..77232d03 100644
--- a/components/landing-page/search-section.tsx
+++ b/components/landing-page/search-section.tsx
@@ -39,10 +39,10 @@ const SearchSection = () => {
-
-
-
-
+
+
+
+
diff --git a/messages/en.json b/messages/en.json
index 651c8801..0de3e4ab 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -363,6 +363,7 @@
"download": "Download",
"coverage": "Our Official Coverage",
"officialCoverage": "Official coverage sourced from Polri activities at the National Police Headquarters and Regional Police throughout Indonesia",
+ "officialPolda": "Official Coverage Sourced From Police Activities At Polda",
"allContent": "All Content",
"searchCoverage": "Search Coverage",
"newContent": "Latest Content",
diff --git a/messages/in.json b/messages/in.json
index cdc0a5e6..049deb37 100644
--- a/messages/in.json
+++ b/messages/in.json
@@ -363,6 +363,7 @@
"download": "DOWNLOAD",
"coverage": "LIPUTAN RESMI KAMI",
"officialCoverage": "Liputan resmi yang bersumber dari kegiatan Polri di Mabes dan Polda seluruh Indonesia",
+ "officialPolda": "Liputan Resmi Yang Bersumber Dari Kegiatan Polri Di Polda",
"allContent": "Semua Konten",
"searchCoverage": "Cari Liputan",
"searchCoverageHere": "Cari Liputan Disini",