Thubmnail
{selectedFileType === "image" ? (
selectedMainImage && files.length >= selectedMainImage ? (
) : thumbnailImg.length > 0 ? (
) : (
<>
handleFileChange(e, "image")}
/>
{thumbnailValidation !== "" && (
Upload thumbnail atau pilih dari File Media
)}
>
)
) : thumbnailDocumentImg.length > 0 ? (
) : (
<>
handleFileChange(e, "document")}
/>
{thumbnailDocumentValidation !== "" && (
Upload thumbnail
)}
>
)}
Kategori
(
"!rounded-lg bg-white !border-1 !border-gray-200 dark:!border-stone-500",
}}
classNamePrefix="select"
onChange={(selectedOptions) => {
const fixed = ensureParentSelected(
(selectedOptions as any[]) ?? [],
listCategory,
);
console.log("fixed", fixed);
onChange(fixed);
}}
closeMenuOnSelect={false}
components={animatedComponents}
isClearable={true}
isSearchable={true}
isMulti={true}
placeholder="Kategori..."
name="sub-module"
options={listCategory}
value={value}
/>
)}
/>
{errors?.category && (
{errors.category?.message}
)}
Tags
(
}
onKeyDown={(e) => {
if (e.key === "Enter") {
if (tag.trim() !== "") {
setValue("tags", [...value, tag.trim()]);
setTag("");
e.preventDefault();
}
}
}}
labelPlacement="outside"
className="w-full h-fit"
classNames={{
inputWrapper: [
"border-1 rounded-lg",
"dark:group-data-[focused=false]:bg-transparent !border-1 dark:!border-gray-400",
],
}}
variant="bordered"
/>
)}
/>
{errors?.tags && (
{errors.tags?.message}
)}
Publish dengan Jadwal
{isScheduled && (
Tanggal
)}
{/*
*/}