import { useTranslation } from 'next-i18next'; interface AlertProps { onClose?: () => void; type: 'error' | 'warning'; message: string; } function Alert(props: AlertProps): JSX.Element { const { t } = useTranslation(['index', 'errors']); let spanStyle = 'bg-red-100 border border-red-400 text-red-700'; let svgStyle = 'text-red-500'; let icon; switch (props.type) { case 'error': // icon = () => // break; case 'warning': spanStyle = 'bg-yellow-100 border border-yellow-400 text-yellow-700'; svgStyle = 'text-yellow-500'; break; } return (