diff --git a/components/form/content/spit-convert-form.tsx b/components/form/content/spit-convert-form.tsx index 081aaf2f..8845685d 100644 --- a/components/form/content/spit-convert-form.tsx +++ b/components/form/content/spit-convert-form.tsx @@ -193,7 +193,6 @@ export default function FormConvertSPIT() { const [showRewriteEditor, setShowRewriteEditor] = useState(false); const [isGeneratingRewrite, setIsGeneratingRewrite] = useState(false); const [isLoadingRewrite, setIsLoadingRewrite] = useState(false); - // <-- changed: detailThumb is now FileType[] (objects from API) --> const [detailThumb, setDetailThumb] = useState([]); const [thumbsSwiper, setThumbsSwiper] = useState(null); diff --git a/components/landing-page/new-content.tsx b/components/landing-page/new-content.tsx index bbc0bbca..5cd40467 100644 --- a/components/landing-page/new-content.tsx +++ b/components/landing-page/new-content.tsx @@ -19,6 +19,8 @@ import { Skeleton } from "../ui/skeleton"; import Image from "next/image"; import { motion } from "framer-motion"; import ImageBlurry from "../ui/image-blurry"; +import { formatDateToIndonesian } from "@/utils/globals"; +import { Icon } from "../ui/icon"; const NewContent = (props: { group: string; type: string }) => { const [newContent, setNewContent] = useState(); @@ -276,10 +278,24 @@ const NewContent = (props: { group: string; type: string }) => { {/* Caption section */}
-

- {image?.categoryName?.toUpperCase() ?? - "Giat Pimpinan"} -

+
+

+ {image?.categoryName?.toUpperCase() ?? + "Giat Pimpinan"} +

+

+ {formatDateToIndonesian( + new Date(image?.createdAt) + )}{" "} + {image?.timezone ?? "WIB"} | + {" "} + {image.clickCount} +

+
{ {/* Caption */}
-

- {audio?.categoryName?.toUpperCase() ?? - "GIAT PIMPINAN"} -

+
+

+ {audio?.categoryName?.toUpperCase() ?? + "Giat Pimpinan"} +

+

+ {formatDateToIndonesian( + new Date(audio?.createdAt) + )}{" "} + {audio?.timezone ?? "WIB"} | + {" "} + {audio.clickCount} +

+
-

+

{audio?.title}

@@ -488,10 +518,25 @@ const NewContent = (props: { group: string; type: string }) => { {/* Caption section */}
-

- {video?.categoryName?.toUpperCase() ?? - "Giat Pimpinan"} -

+
+

+ {video?.categoryName?.toUpperCase() ?? + "Giat Pimpinan"} +

+

+ {formatDateToIndonesian( + new Date(video?.createdAt) + )}{" "} + {video?.timezone ?? "WIB"} | + {" "} + {video.clickCount} +

+
+ { {/* Konten bawah */}
{/* Kategori merah */} -
- {text?.categoryName?.toUpperCase() ?? "Text"} +
+

+ {text?.categoryName?.toUpperCase() ?? + "Giat Pimpinan"} +

+

+ {formatDateToIndonesian( + new Date(text?.createdAt) + )}{" "} + {text?.timezone ?? "WIB"} | + {" "} + {text.clickCount} +

{/* Judul */} @@ -591,7 +651,7 @@ const NewContent = (props: { group: string; type: string }) => { prefixPath + `/document/detail/${text?.slug}` } > -

+

{text?.title}