umami/components/common/Empty.js

16 lines
399 B
JavaScript
Raw Normal View History

import classNames from 'classnames';
2023-07-02 07:02:49 +02:00
import styles from './Empty.module.css';
2023-04-08 07:03:52 +02:00
import useMessages from 'hooks/useMessages';
2023-07-02 07:02:49 +02:00
export function Empty({ message, className }) {
2023-04-08 07:03:52 +02:00
const { formatMessage, messages } = useMessages();
return (
<div className={classNames(styles.container, className)}>
2023-07-02 07:02:49 +02:00
{message || formatMessage(messages.noDataAvailable)}
</div>
);
}
2021-02-16 13:32:04 +01:00
2023-07-02 07:02:49 +02:00
export default Empty;