diff --git a/app/[locale]/(public)/faqs/page.tsx b/app/[locale]/(public)/faqs/page.tsx index 8acd56bb..65665137 100644 --- a/app/[locale]/(public)/faqs/page.tsx +++ b/app/[locale]/(public)/faqs/page.tsx @@ -2,6 +2,7 @@ import { Reveal } from "@/components/landing-page/Reveal"; import React, { useState } from "react"; import { useTranslations } from "next-intl"; +import Image from "next/image"; interface FAQItem { question: string; @@ -41,19 +42,41 @@ const FAQS: React.FC = () => { {/* Header */}
- Faqs -

Frequently Asked Questions

+ Faqs +

+ Frequently Asked Questions +

{/* FAQS Items */}
{faqs?.map((faq, index) => ( -
-
toggleFAQ(index)}> -

{faq.question}

- {openIndex === index ? "−" : "+"} +
+
toggleFAQ(index)} + > +

+ {faq.question} +

+ + {openIndex === index ? "−" : "+"} +
- {openIndex === index &&

{faq.answer}

} + {openIndex === index && ( +

+ {faq.answer} +

+ )}
))}
diff --git a/components/form/content/image-detail-form.tsx b/components/form/content/image-detail-form.tsx index 8a269c12..7d0d4305 100644 --- a/components/form/content/image-detail-form.tsx +++ b/components/form/content/image-detail-form.tsx @@ -1029,8 +1029,6 @@ export default function FormImageDetail() { listFiles: rejectedFiles, }; - console.log("reject", dataReject); - const resReject = await rejectFiles(dataReject); if (resReject?.error) { diff --git a/components/landing-page/advertisement-placements.tsx b/components/landing-page/advertisement-placements.tsx index b9bf6d7a..41e60e61 100644 --- a/components/landing-page/advertisement-placements.tsx +++ b/components/landing-page/advertisement-placements.tsx @@ -1,78 +1,145 @@ +// import { listDataAdvertisements } from "@/service/broadcast/broadcast"; +// import { useEffect, useState } from "react"; +// import * as React from "react"; + +// interface Advertisement { +// id: string; +// placements: string; +// imageUrl: string; +// [key: string]: any; +// } + +// // // Simulasi fungsi API (replace dengan yang asli) +// // async function listDataAdvertisements( +// // page: number, +// // size: number, +// // search: string, +// // category: string, +// // status: string +// // ) { +// // // contoh struktur response dummy +// // return { +// // data: { +// // data: { +// // content: [ +// // { id: "1", imageUrl: "/images/all-img/kiri1.png" }, +// // { id: "2", imageUrl: "/images/all-img/kiri2.png" }, +// // ], +// // totalElements: 2, +// // totalPages: 1, +// // }, +// // }, +// // }; +// // } + +// const AdvertisementPlacements = (props: { +// placement: string; +// data: Advertisement[]; +// loading: boolean; +// }) => { +// const [ads, setAds] = useState([]); +// useEffect(() => { +// if (!props.loading && props.data.length > 0) { +// console.log( +// "RRRRRR", +// props.data[0].placements.includes(props.placement), +// props.placement +// ); + +// const filtered = props.data.filter((a) => +// a.placements.includes(props.placement) +// ); +// let temps: Advertisement[] | undefined[] = []; +// temps[0] = filtered.find((b) => b.placements.includes("top")); +// temps[1] = filtered.find((b) => b.placements.includes("bottom")); +// setAds(temps); +// console.log("PPPPPP", filtered); +// } +// }, [props.data, props.loading]); + +// return ( +//
+// {props.loading &&

Loading...

} +// {ads?.map( +// (ad) => +// ad && ( +// {`Banner +// ) +// )} +//
+// ); +// }; + +// export default AdvertisementPlacements; import { listDataAdvertisements } from "@/service/broadcast/broadcast"; import { useEffect, useState } from "react"; import * as React from "react"; +import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog"; interface Advertisement { id: string; placements: string; imageUrl: string; + contentFileUrl?: string; [key: string]: any; } -// // Simulasi fungsi API (replace dengan yang asli) -// async function listDataAdvertisements( -// page: number, -// size: number, -// search: string, -// category: string, -// status: string -// ) { -// // contoh struktur response dummy -// return { -// data: { -// data: { -// content: [ -// { id: "1", imageUrl: "/images/all-img/kiri1.png" }, -// { id: "2", imageUrl: "/images/all-img/kiri2.png" }, -// ], -// totalElements: 2, -// totalPages: 1, -// }, -// }, -// }; -// } - const AdvertisementPlacements = (props: { placement: string; data: Advertisement[]; loading: boolean; }) => { const [ads, setAds] = useState([]); + useEffect(() => { if (!props.loading && props.data.length > 0) { - console.log( - "RRRRRR", - props.data[0].placements.includes(props.placement), - props.placement - ); - const filtered = props.data.filter((a) => a.placements.includes(props.placement) ); + let temps: Advertisement[] | undefined[] = []; temps[0] = filtered.find((b) => b.placements.includes("top")); temps[1] = filtered.find((b) => b.placements.includes("bottom")); setAds(temps); - console.log("PPPPPP", filtered); } - }, [props.data, props.loading]); + }, [props.data, props.loading, props.placement]); return (
{props.loading &&

Loading...

} + {ads?.map( (ad) => ad && ( - {`Banner + + + {`Banner + + + {`Banner + + ) )}
diff --git a/messages/en.json b/messages/en.json index 4a5ce2c0..5926772d 100644 --- a/messages/en.json +++ b/messages/en.json @@ -557,9 +557,9 @@ "question1": "WHAT CONTENT IS ON MEDIAHUB AND WHAT CATEGORIES ARE THERE IN IT?", "answer1": "MediaHub has a variety of content such as news, videos, and documents categorized into topics such as education, entertainment, and current affairs.", "question2": "HOW CAN MEDIAHUB CONTENT BE DOWNLOADED?", - "answer2": "You can download content by clicking the download button available on each content on the MediaHub page.", + "answer2": "A=) Login first to be able to download B=) Select the photo size you want C=) Click the download button available on each content on the MediaHub page.", "question3": "WHO CAN REGISTER AS A MEDIAHUB USER?", - "answer3": "Anyone who has an interest in the content on MediaHub can register as a user, either for personal or professional purposes.", + "answer3": "Anyone interested in MediaHub content can register as a user, including individuals and professionals within the General Public, Police, Journalists, and Presidential Staff Office (KSP) categories.", "question4": "WHAT IS MEDIAHUB? AND WHAT ARE THE FEATURES IN IT?", "answer4": "MediaHub is a platform that provides various informative and educational content. Key features include search, download, and personalization of content.", "welcome": "Welcome To", diff --git a/messages/in.json b/messages/in.json index d000076a..9caf08c1 100644 --- a/messages/in.json +++ b/messages/in.json @@ -560,9 +560,9 @@ "question1": "APA SAJA KONTEN-KONTEN YANG ADA DI MEDIAHUB DAN KATEGORI DI DALAMNYA?", "answer1": "MediaHub memiliki beragam konten seperti berita, video, dan dokumen yang dikategorikan dalam topik seperti edukasi, hiburan, dan informasi terkini.", "question2": "BAGAIMANA KONTEN DARI MEDIAHUB DAPAT DIUNDUH?", - "answer2": "Anda dapat mengunduh konten dengan klik tombol unduh yang tersedia pada setiap konten di halaman MediaHub.", + "answer2": "A=) Login terlebih dahulu untuk dapat mengunduh. B=) Pilih size foto yang anda inginkan. C=) Klik tombol unduh yang tersedia pada setiap konten di halaman MediaHub.", "question3": "SIAPA SAJA YANG DAPAT MENDAFTARKAN DIRI SEBAGAI PENGGUNA MEDIAHUB?", - "answer3": "Semua orang yang memiliki minat terhadap konten di MediaHub dapat mendaftar sebagai pengguna, baik untuk personal maupun profesional.", + "answer3": "Semua orang yang memiliki minat terhadap konten di MediaHub dapat mendaftar sebagai pengguna, baik untuk personal maupun profesional yang tergabung dalam kategpri Masyarakat Umum. Anggota Polri, Jurnalis serta KSP", "question4": "APA ITU MEDIAHUB? DAN APA SAJA FITUR YANG ADA DI DALAMNYA?", "answer4": "MediaHub adalah platform yang menyediakan berbagai konten informatif dan edukatif. Fitur utama meliputi pencarian, pengunduhan, dan personalisasi konten.", "welcome": "Selamat Datang di",