diff --git a/components/form/content/spit-convert-form.tsx b/components/form/content/spit-convert-form.tsx
index 53800599..8ae4bb51 100644
--- a/components/form/content/spit-convert-form.tsx
+++ b/components/form/content/spit-convert-form.tsx
@@ -499,94 +499,92 @@ export default function FormConvertSPIT() {
-
-
-
-
(
- //
-
- )}
- />
- {errors.contentDescription?.message && (
-
- {errors.contentDescription.message}
-
+
+
+ (
+ //
+
)}
-
-
-
-
- {showRewriteEditor && (
-
- {isGeneratedArticle && (
-
- {articleIds.map((id: string, index: number) => (
-
- ))}
-
- )}
-
-
-
-
-
-
-
- isLoadingData ? (
-
-
- Loading Proses Data...
-
-
- ) : (
-
- )
- }
- />
- {errors.contentRewriteDescription?.message && (
-
- {errors.contentRewriteDescription.message}
-
- )}
-
-
+ />
+ {errors.contentDescription?.message && (
+
+ {errors.contentDescription.message}
+
)}
+
+
+
+ {showRewriteEditor && (
+
+ {isGeneratedArticle && (
+
+ {articleIds.map((id: string, index: number) => (
+
+ ))}
+
+ )}
+
+
+
+
+
+
+
+ isLoadingData ? (
+
+
+ Loading Proses Data...
+
+
+ ) : (
+
+ )
+ }
+ />
+ {errors.contentRewriteDescription?.message && (
+
+ {errors.contentRewriteDescription.message}
+
+ )}
+
+
+ )}
diff --git a/components/form/content/video-form.tsx b/components/form/content/video-form.tsx
index f569b617..aea060eb 100644
--- a/components/form/content/video-form.tsx
+++ b/components/form/content/video-form.tsx
@@ -150,7 +150,24 @@ export default function FormVideo() {
const { getRootProps, getInputProps } = useDropzone({
onDrop: (acceptedFiles) => {
- setFiles(acceptedFiles.map((file) => Object.assign(file)));
+ const validFiles = acceptedFiles.filter((file) => {
+ const isValidType = ["video/mp4", "video/mov"].includes(file.type);
+ const isValidSize = file.size <= 100 * 1024 * 1024; // 100MB
+ return isValidType && isValidSize;
+ });
+
+ if (!validFiles.length) {
+ alert("Format file harus mp4/mov dan ukuran maksimal 100MB");
+ return;
+ }
+
+ setFiles(
+ validFiles.map((file) =>
+ Object.assign(file, {
+ preview: URL.createObjectURL(file),
+ })
+ )
+ );
},
});
@@ -1024,10 +1041,10 @@ export default function FormVideo() {
)}
- */}
{preview && (
![]()
{
+ return import("@/components/editor/view-editor");
+ },
+ { ssr: false }
+);
+
export default function FormTaskDetail() {
const MySwal = withReactContent(Swal);
const router = useRouter();
@@ -342,6 +351,7 @@ export default function FormTaskDetail() {
- {/* Submit Button */}
-
+
+
+
) : (