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.
31 lines
641 B
31 lines
641 B
import {UncontrolledAlert} from 'reactstrap';
|
|
import {useTranslation} from "next-i18next";
|
|
|
|
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;
|