import { showNotification } from "@mantine/notifications"; export default function notification({ title, message, type }: { title: string, message: string, type: "success" | "error" | "warning" | "info" }) { switch (type) { case "success": return showNotification({ title, message, color: "green", autoClose: 3000, }) break; case "error": return showNotification({ title, message, color: "red", autoClose: 3000, }) break; case "warning": return showNotification({ title, message, color: "orange", autoClose: 3000, }) break; case "info": return showNotification({ title, message, color: "blue", autoClose: 3000, }) break; } }