import { Alert } from "antd";
import { useTranslations } from "next-intl";

interface AlertProps {
  message: string;
  desc: string;
  main: string;
}

function AlertComponent({ message, desc, main }: AlertProps) {
  const t = useTranslations(main);

  return (
    <Alert message={t(message)} description={t(desc)} type="error" showIcon />
  );
}

export default AlertComponent;
