mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
16 lines
453 B
JavaScript
16 lines
453 B
JavaScript
import classNames from 'classnames';
|
|
import styles from './Page.module.css';
|
|
import { Banner, Loading } from 'react-basics';
|
|
|
|
export default function Page({ className, error, loading, children }) {
|
|
if (error) {
|
|
return <Banner variant="error">Something went wrong.</Banner>;
|
|
}
|
|
|
|
if (loading) {
|
|
return <Loading icon="spinner" size="xl" position="page" />;
|
|
}
|
|
|
|
return <div className={classNames(styles.page, className)}>{children}</div>;
|
|
}
|