- router.push(
- prefixPath + `/video/detail/${video?.slug}`
- )
- }
+
+// router.push(
+// prefixPath + `/video/detail/${video?.slug}`
+// )
+// }
>
{/*

*/}
@@ -862,7 +862,7 @@ const FilterPage = () => {
{video?.title}
-
+
))}
diff --git a/app/sitemap.xml/route.ts b/app/sitemap.xml/route.ts
new file mode 100644
index 00000000..09b026e8
--- /dev/null
+++ b/app/sitemap.xml/route.ts
@@ -0,0 +1,40 @@
+"use server";
+import { getListContent } from "@/service/landing/landing";
+import { NextResponse } from "next/server";
+
+export async function GET() {
+ const baseUrl = "https://mediahub.polri.go.id/in";
+
+ const response = await getListContent({ page: 1, limit: "100", search: "" });
+
+ const articles = response?.data?.data || [];
+
+ const urls = articles
+ .map(
+ (article: any) => `
+
+ ${baseUrl}/${article.fileTypeId == 1 ? "image" : article.fileTypeId == 2 ? "video" : article.fileTypeId == 3 ? "document" : "audio"}/detail/${article.id}-${article.slug}
+ ${new Date(article.updatedAt).toISOString()}
+ weekly
+ 0.8
+ `
+ )
+ .join("");
+
+ const sitemap = `
+
+
+ ${baseUrl}
+ ${new Date().toISOString()}
+ daily
+ 1.0
+
+ ${urls}
+ `;
+
+ return new NextResponse(sitemap, {
+ headers: {
+ "Content-Type": "application/xml",
+ },
+ });
+}
diff --git a/components/form/content/image-update-form.tsx b/components/form/content/image-update-form.tsx
index 2aea0c27..bfe3bf03 100644
--- a/components/form/content/image-update-form.tsx
+++ b/components/form/content/image-update-form.tsx
@@ -147,9 +147,7 @@ export default function FormImageUpdate() {
let counterUpdateProgress = 0;
const [progressList, setProgressList] = useState
([]);
let uploadPersen = 0;
-
const isDetailOfRegionShowed = false;
-
const [isStartUpload, setIsStartUpload] = useState(false);
const [counterProgress, setCounterProgress] = useState(0);
const t = useTranslations("Form");
@@ -2329,16 +2327,27 @@ export default function FormImageUpdate() {
{tags.map((tag, index) => (
+ {/* Hidden span untuk ukur lebar teks */}
+
+ {tag || " "}
+
+
handleEditTag(index, e.target.value)}
- className="bg-black text-white border-none focus:outline-none w-auto"
+ style={{
+ width: `${Math.max(tag.length, 1)}ch`,
+ }}
+ className="bg-black text-white border-none focus:outline-none"
/>
+
))}
+
{/*
{detail?.tags?.split(",").map((tag, index) => (
-
+
diff --git a/components/landing-page/filter-all/image-filter-card.tsx b/components/landing-page/filter-all/image-filter-card.tsx
index 70d45b8e..40743fd7 100644
--- a/components/landing-page/filter-all/image-filter-card.tsx
+++ b/components/landing-page/filter-all/image-filter-card.tsx
@@ -190,10 +190,11 @@ export default function FilterImageComponent(props: {
{newContent?.map((image: any) => (
-
- router.push(prefixPath + `/image/detail/${image?.slug}`)
- }
+
+ // router.push(prefixPath + `/image/detail/${image?.slug}`)
+ // }
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
>
{/* Image with motion effect */}
@@ -260,7 +261,7 @@ export default function FilterImageComponent(props: {
*/}
-
+
))}
diff --git a/components/main/image-detail.tsx b/components/main/image-detail.tsx
index bd11c994..38aa87a8 100644
--- a/components/main/image-detail.tsx
+++ b/components/main/image-detail.tsx
@@ -578,7 +578,7 @@ const DetailImage = (data: any) => {
height={1440}
src={detailDataImage?.files[selectedImage]?.url}
alt="Main"
- className="rounded-lg h-[300px] w-screen lg:h-[600px] lg:w-full object-contain"
+ className="rounded-lg h-[300px] w-screen lg:h-[570px] lg:w-full object-contain"
/>
diff --git a/components/main/video-detail.tsx b/components/main/video-detail.tsx
index ed75ff9b..f2cc40b1 100644
--- a/components/main/video-detail.tsx
+++ b/components/main/video-detail.tsx
@@ -472,9 +472,9 @@ const DetailVideo = () => {
*/}
-