"use client";

import { useEffect } from "react";
import Swal from "sweetalert2";

export default function ShowError({ message }: { message: string }) {
  useEffect(() => {
    if (message) {
      Swal.fire({
        title: message,
        icon: "error",
        draggable: true,
      });
    }
  }, [message]);

  return null;
}
