You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mvfront-react/components/Alert.tsx

31 lines
701 B

import { UncontrolledAlert } from 'reactstrap';
import { useTranslation } from 'next-i18next';
import { CONTACT_MAIL } from '@services/constants';
const AlertDismissible = ({ msg, color }) => {
const { t } = useTranslation();
if (msg) {
return (
<UncontrolledAlert color={color}>
<h4 className={`${color}-heading`}>{t(msg)}</h4>
<p>
<a
href={`mailto:${CONTACT_MAIL}?subject=[HELP]`}
className="btn btn-success m-auto"
>
{t('error.help')}
</a>
</p>
</UncontrolledAlert>
);
}
return null;
};
AlertDismissible.defaultProps = {
color: 'danger',
};
export default AlertDismissible;