feat: update navigation paths to use '/internship'; enhance certificate generation and user interface elements

This commit is contained in:
Kemas M. Aryadary Rasyad
2026-08-04 09:21:16 +07:00
parent 5dbb21bf5a
commit 753012732d
17 changed files with 78 additions and 46 deletions
@@ -27,7 +27,14 @@ export default function TaskFormFile({ taskId, projectId, deadline, initialSubmi
selectedFiles.forEach((file) => {
const ext = file.name.split(".").pop()?.toLowerCase();
if (ext && allowedExtensions.includes(ext)) {
if (file.size <= 5 * 1024 * 1024) validFiles.push(file);
if (file.size <= 5 * 1024 * 1024) {
validFiles.push(file);
} else {
customToast.error(
"File terlalu besar!",
`File ${file.name} melebihi batas ukuran 5MB.`
);
}
}
});
if (validFiles.length > 0) setFiles((prev) => [...prev, ...validFiles]);