Files
front-AT/app/Components/Global/ShowError.tsx
T

19 lines
333 B
TypeScript
Raw Normal View History

2025-10-01 15:29:23 -06:00
"use client";
import { useEffect } from "react";
import Swal from "sweetalert2";
2025-10-01 15:29:23 -06:00
export default function ShowError({ message }: { message: string }) {
useEffect(() => {
if (message) {
Swal.fire({
title: message,
icon: "error",
draggable: true,
});
2025-10-01 15:29:23 -06:00
}
}, [message]);
return null;
}