umami/components/layout/Page.js
Brian Cao e1f99a7d01
Rewrite admin. (#1713)
* Rewrite admin.

* Clean up password forms.

* Fix naming issues.

* CSS Naming.
2022-12-26 16:57:59 -08:00

16 lines
412 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 />;
}
return <div className={classNames(styles.page, className)}>{children}</div>;
}