Updated components build.

This commit is contained in:
Mike Cao 2025-09-01 15:59:06 -07:00
parent 5f27ba149b
commit 56af91950a
53 changed files with 942 additions and 333 deletions

View file

@ -1,8 +1,7 @@
import { ErrorInfo, ReactNode } from 'react';
import { ErrorBoundary as Boundary } from 'react-error-boundary';
import { Button } from '@umami/react-zen';
import { Button, Column } from '@umami/react-zen';
import { useMessages } from '@/components/hooks';
import styles from './ErrorBoundary.module.css';
const logError = (error: Error, info: ErrorInfo) => {
// eslint-disable-next-line no-console
@ -14,12 +13,20 @@ export function ErrorBoundary({ children }: { children: ReactNode }) {
const fallbackRender = ({ error, resetErrorBoundary }) => {
return (
<div className={styles.error} role="alert">
<Column
role="alert"
gap
width="100%"
height="100%"
position="absolute"
justifyContent="center"
alignItems="center"
>
<h1>{formatMessage(messages.error)}</h1>
<h3>{error.message}</h3>
<pre>{error.stack}</pre>
<Button onClick={resetErrorBoundary}>OK</Button>
</div>
</Column>
);
};