update loader

This commit is contained in:
dmsanhrProject 2025-11-06 15:02:32 +07:00
parent 1462a1ff54
commit 0c2c06678a
2 changed files with 0 additions and 8 deletions

View File

@ -5,7 +5,6 @@ export default function LoadingOverlay({ show = false, text = "Memproses data...
return ( return (
<div className="fixed inset-0 z-50 flex flex-col items-center justify-center bg-white/30"> <div className="fixed inset-0 z-50 flex flex-col items-center justify-center bg-white/30">
{/* Animated Dots */}
<motion.div <motion.div
className="flex gap-3 mb-4" className="flex gap-3 mb-4"
initial={{ opacity: 0 }} initial={{ opacity: 0 }}
@ -29,7 +28,6 @@ export default function LoadingOverlay({ show = false, text = "Memproses data...
))} ))}
</motion.div> </motion.div>
{/* Text with subtle fade animation */}
<motion.p <motion.p
className="text-gray-700 text-sm font-medium" className="text-gray-700 text-sm font-medium"
initial={{ opacity: 0 }} initial={{ opacity: 0 }}

View File

@ -19,7 +19,6 @@ export default function ViewsAdminUploadValidate() {
const [alertMessage, setAlertMessage] = useState(""); const [alertMessage, setAlertMessage] = useState("");
const [alertType, setAlertType] = useState("info"); const [alertType, setAlertType] = useState("info");
// Alert browser sebelum meninggalkan halaman
useEffect(() => { useEffect(() => {
const handleBeforeUnload = (e) => { const handleBeforeUnload = (e) => {
if (result && !loading) { if (result && !loading) {
@ -34,7 +33,6 @@ export default function ViewsAdminUploadValidate() {
return () => window.removeEventListener("beforeunload", handleBeforeUnload); return () => window.removeEventListener("beforeunload", handleBeforeUnload);
}, [result, loading]); }, [result, loading]);
// Alert saat navigasi ke halaman lain dalam app (React Router)
useEffect(() => { useEffect(() => {
const handleNavigation = (e) => { const handleNavigation = (e) => {
if (result && !loading) { if (result && !loading) {
@ -66,10 +64,6 @@ export default function ViewsAdminUploadValidate() {
setShowAlert(true); setShowAlert(true);
return; return;
} }
// setAlertMessage("Mengunggah ke database...");
// setAlertType("info");
// setShowAlert(true);
handleConfirmUpload(); handleConfirmUpload();
}; };