umami/components/common/ErrorMessage.js

19 lines
464 B
JavaScript
Raw Normal View History

2023-02-02 03:39:54 +01:00
import { Icon, Icons, Text } from 'react-basics';
import styles from './ErrorMessage.module.css';
2023-03-22 22:05:55 +01:00
import useMessages from 'hooks/useMessages';
2023-04-21 17:00:42 +02:00
export function ErrorMessage() {
2023-03-22 22:05:55 +01:00
const { formatMessage, messages } = useMessages();
2023-02-02 03:39:54 +01:00
return (
<div className={styles.error}>
<Icon className={styles.icon} size="large">
<Icons.Alert />
</Icon>
2023-02-02 03:39:54 +01:00
<Text>{formatMessage(messages.error)}</Text>
</div>
);
}
2023-04-21 17:00:42 +02:00
export default ErrorMessage;