diff --git a/components/form/content/video-form.tsx b/components/form/content/video-form.tsx index b9f4972c..5ec8dddc 100644 --- a/components/form/content/video-form.tsx +++ b/components/form/content/video-form.tsx @@ -582,7 +582,6 @@ export default function FormVideo() { console.log("📝 Deskripsi final yang dikirim:", finalDescription); - let requestData: { title: string; description: string; @@ -650,7 +649,16 @@ export default function FormVideo() { setIsStartUpload(true); setProgressList(progressInfoArr); - close(); + MySwal.fire({ + title: "Mengunggah Video...", + text: "Mohon tunggu hingga proses upload selesai.", + allowOutsideClick: false, + allowEscapeKey: false, + didOpen: () => { + Swal.showLoading(); + }, + }); + // close(); // showProgress(); files.map(async (item: any, index: number) => { await uploadResumableFile(index, String(id), item, "0"); @@ -763,19 +771,28 @@ export default function FormVideo() { counter++; } } - if (counter == progressInfo.length) { + if (counter === progressInfo.length) { setIsStartUpload(false); - // hideProgress(); Cookies.remove("idCreate"); + + close(); + successSubmit("/in/contributor/content/video"); } + + // if (counter == progressInfo.length) { + // setIsStartUpload(false); + // // hideProgress(); + // Cookies.remove("idCreate"); + // successSubmit("/in/contributor/content/video"); + // } } const handleImageChange = (e: React.ChangeEvent) => { const file = e.target.files?.[0]; if (file) { - setThumbnail(file); // Simpan file asli tanpa dimodifikasi - setPreview(URL.createObjectURL(file)); // Simpan preview string terpisah + setThumbnail(file); + setPreview(URL.createObjectURL(file)); console.log("Selected Thumbnail:", file); } }; diff --git a/components/landing-page/filter-all/audio-filter-card.tsx b/components/landing-page/filter-all/audio-filter-card.tsx index c9787bd7..d59fff53 100644 --- a/components/landing-page/filter-all/audio-filter-card.tsx +++ b/components/landing-page/filter-all/audio-filter-card.tsx @@ -305,18 +305,18 @@ export default function FilterAudioComponent(props: {
Lihat Semua diff --git a/components/landing-page/filter-all/document-filter-card.tsx b/components/landing-page/filter-all/document-filter-card.tsx index b4d3dd21..44898b75 100644 --- a/components/landing-page/filter-all/document-filter-card.tsx +++ b/components/landing-page/filter-all/document-filter-card.tsx @@ -288,7 +288,19 @@ export default function FilterDocumentComponent(props: { // categorie ? `&category=${categorie}` : "" // }${group ? `&group=${group}` : ""}`} - href={isRegional ? `/regional/all-polda/document/all` : href} + href={ + `${ + asPath.includes("/polda/") + ? `/${asPath.split("/")[1]}/${asPath.split("/")[2]}` + : "" + }/document/` + + `${group ? "regional?" : "filter?"}` + + `sortBy=${sortBy === "popular" ? "popular" : "latest"}` + + `${title ? `&title=${title.toLowerCase()}` : ""}` + + `${categorie ? `&category=${categorie}` : ""}` + } + + // href={isRegional ? `/regional/all-polda/document/all` : href} className="border border-red-500 text-red-500 hover:bg-red-500 hover:text-white transition-colors duration-200 px-4 py-2 rounded-md text-sm" > Lihat Semua diff --git a/components/landing-page/filter-all/image-filter-card.tsx b/components/landing-page/filter-all/image-filter-card.tsx index 1472ea39..9a097743 100644 --- a/components/landing-page/filter-all/image-filter-card.tsx +++ b/components/landing-page/filter-all/image-filter-card.tsx @@ -289,7 +289,26 @@ export default function FilterImageComponent(props: {
Lihat Semua diff --git a/components/landing-page/filter-all/video-filter-card.tsx b/components/landing-page/filter-all/video-filter-card.tsx index 1169ad34..794cfc44 100644 --- a/components/landing-page/filter-all/video-filter-card.tsx +++ b/components/landing-page/filter-all/video-filter-card.tsx @@ -258,27 +258,27 @@ export default function FilterVideoComponent(props: {
Lihat Semua diff --git a/components/landing-page/navbar.tsx b/components/landing-page/navbar.tsx index 741f68ab..28998ddd 100644 --- a/components/landing-page/navbar.tsx +++ b/components/landing-page/navbar.tsx @@ -99,7 +99,7 @@ const Navbar = () => { ? `/polda/${poldaName}` : satkerName ? `/satker/${satkerName}` - : ""; + : "/"; let menu = "";