From cd37b0e396923208545adb27c53d7644c9fb5172 Mon Sep 17 00:00:00 2001 From: sabdayagra Date: Tue, 31 Dec 2024 15:25:40 +0700 Subject: [PATCH] feat: add polda section --- app/[locale]/(public)/audio/filter/page.tsx | 85 ++-- .../(public)/content-management/page.tsx | 16 +- .../(public)/document/filter/page.tsx | 56 +-- app/[locale]/(public)/image/filter/page.tsx | 51 ++- .../(public)/polda/[polda_name]/page.tsx | 21 + app/[locale]/(public)/polda/layout.tsx | 22 + .../(public)/polda/metro-jaya/page.tsx | 7 - app/[locale]/(public)/video/filter/page.tsx | 51 ++- components/landing-page/coverage.tsx | 78 ++-- components/landing-page/header-banner.tsx | 121 +++++ components/landing-page/navbar.tsx | 422 +++--------------- components/landing-page/new-content.tsx | 16 +- components/landing-page/popular-polda.tsx | 22 + components/landing-page/welcome-polda.tsx | 107 +++++ package-lock.json | 9 + package.json | 1 + utils/globals.tsx | 20 +- 17 files changed, 580 insertions(+), 525 deletions(-) create mode 100644 app/[locale]/(public)/polda/[polda_name]/page.tsx create mode 100644 app/[locale]/(public)/polda/layout.tsx delete mode 100644 app/[locale]/(public)/polda/metro-jaya/page.tsx create mode 100644 components/landing-page/header-banner.tsx create mode 100644 components/landing-page/popular-polda.tsx create mode 100644 components/landing-page/welcome-polda.tsx diff --git a/app/[locale]/(public)/audio/filter/page.tsx b/app/[locale]/(public)/audio/filter/page.tsx index bcf720de..6390f9b7 100644 --- a/app/[locale]/(public)/audio/filter/page.tsx +++ b/app/[locale]/(public)/audio/filter/page.tsx @@ -113,7 +113,7 @@ const FilterPage = () => {
{/* Sidebar Kiri */} -
+

Filter @@ -185,7 +185,7 @@ const FilterPage = () => { {/* Konten Kanan */} -
+

Urutkan berdasarkan

- {/* Card */} -
- {audioData?.map((audio: any) => ( - -
- - - -
-
-
- {formatDateToIndonesian(new Date(audio?.createdAt))} {audio?.timezone ? audio?.timezone : "WIB"} | 518 -
-
{audio?.title}
-
-
-
- -
-
- # -
{audio?.duration}
- - + {/* Card */} + {audioData?.length > 0 ? ( +
+ {audioData?.map((audio: any) => ( + +
+ +
-
- - ))} -
+ +
+
+ {formatDateToIndonesian(new Date(audio?.createdAt))} {audio?.timezone ? audio?.timezone : "WIB"} | 518 +
+
{audio?.title}
+
+
+
+ +
+
+ # +
{audio?.duration}
+ + + +
+
+ + ))} +
+ ) : ( +

+ empty +

+ )} +
diff --git a/app/[locale]/(public)/content-management/page.tsx b/app/[locale]/(public)/content-management/page.tsx index 44078562..fe4c2f99 100644 --- a/app/[locale]/(public)/content-management/page.tsx +++ b/app/[locale]/(public)/content-management/page.tsx @@ -252,8 +252,8 @@ const ContentManagement = (props: { type: string }) => { ))}
) : ( -

- empty +

+ empty

) ) : selectedTab == "audio" ? ( @@ -299,8 +299,8 @@ const ContentManagement = (props: { type: string }) => { ))}
) : ( -

- empty +

+ empty

) ) : selectedTab == "image" ? ( @@ -328,8 +328,8 @@ const ContentManagement = (props: { type: string }) => { ))}

) : ( -

- empty +

+ empty

) ) : dummyContent.length > 0 ? ( @@ -361,8 +361,8 @@ const ContentManagement = (props: { type: string }) => { ))}
) : ( -

- empty +

+ empty

)}
diff --git a/app/[locale]/(public)/document/filter/page.tsx b/app/[locale]/(public)/document/filter/page.tsx index b39e4df4..65326a74 100644 --- a/app/[locale]/(public)/document/filter/page.tsx +++ b/app/[locale]/(public)/document/filter/page.tsx @@ -503,33 +503,39 @@ const FilterPage = () => { -
- {documentData?.map((document: any) => ( - -
- - - -
- -
-
- {formatDateToIndonesian(new Date(document?.createdAt))} {document?.timezone ? document?.timezone : "WIB"} | 518 -
-
{document?.title}
-
- - + {documentData?.length > 0 ? ( +
+ {documentData?.map((document: any) => ( + +
+ + - Download Dokumen
-
- - ))} -
+
+
+ {formatDateToIndonesian(new Date(document?.createdAt))} {document?.timezone ? document?.timezone : "WIB"} | 518 +
+
{document?.title}
+
+ + + + Download Dokumen +
+
+ + ))} +
+ ) : ( +

+ empty +

+ )} +
diff --git a/app/[locale]/(public)/image/filter/page.tsx b/app/[locale]/(public)/image/filter/page.tsx index eca5cb0d..e6017d29 100644 --- a/app/[locale]/(public)/image/filter/page.tsx +++ b/app/[locale]/(public)/image/filter/page.tsx @@ -478,28 +478,35 @@ const FilterPage = () => { -
- {imageData?.map((image: any) => ( - - - - -
- {formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| - {image?.clickCount}{" "} - - - {" "} -
-
{image?.title}
- -
-
- ))} -
+ {imageData?.length > 0 ? ( +
+ {imageData?.map((image: any) => ( + + + + +
+ {formatDateToIndonesian(new Date(image?.createdAt))} {image?.timezone ? image?.timezone : "WIB"}| + {image?.clickCount}{" "} + + + {" "} +
+
{image?.title}
+ +
+
+ ))} +
+ ) : ( +

+ empty +

+ )} + diff --git a/app/[locale]/(public)/polda/[polda_name]/page.tsx b/app/[locale]/(public)/polda/[polda_name]/page.tsx new file mode 100644 index 00000000..327fe918 --- /dev/null +++ b/app/[locale]/(public)/polda/[polda_name]/page.tsx @@ -0,0 +1,21 @@ +"use client"; + +import ContentCategory from "@/components/landing-page/content-category"; +import HeaderBanner from "@/components/landing-page/header-banner"; +import NewContent from "@/components/landing-page/new-content"; +import WelcomePolda from "@/components/landing-page/welcome-polda"; +import React from "react"; + +const page = () => { + return ( +
+ + + + + +
+ ); +}; + +export default page; diff --git a/app/[locale]/(public)/polda/layout.tsx b/app/[locale]/(public)/polda/layout.tsx new file mode 100644 index 00000000..fab820cf --- /dev/null +++ b/app/[locale]/(public)/polda/layout.tsx @@ -0,0 +1,22 @@ +import LayoutProvider from "@/providers/layout.provider"; +import LayoutContentProvider from "@/providers/content.provider"; +import DashCodeSidebar from "@/components/partials/sidebar"; +import DashCodeFooter from "@/components/partials/footer"; +import ThemeCustomize from "@/components/partials/customizer"; +import DashCodeHeader from "@/components/partials/header"; + +import { redirect } from "@/components/navigation"; +import Footer from "@/components/landing-page/footer"; +import Navbar from "@/components/landing-page/navbar"; + +const layout = async ({ children }: { children: React.ReactNode }) => { + return ( + <> + + {children} +