mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 12:05:41 +01:00
Update ErrorBoundary.tsx
This commit is contained in:
parent
e881735a23
commit
42e0f34138
1 changed files with 2 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ const logError = (error: Error, info: ErrorInfo) => {
|
|||
};
|
||||
|
||||
export function ErrorBoundary({ children }: { children: ReactNode }) {
|
||||
const { formatMessage, messages } = useMessages();
|
||||
const { formatMessage, messages, labels } = useMessages();
|
||||
|
||||
const fallbackRender = ({ error, resetErrorBoundary }) => {
|
||||
return (
|
||||
|
|
@ -18,7 +18,7 @@ export function ErrorBoundary({ children }: { children: ReactNode }) {
|
|||
<h1>{formatMessage(messages.error)}</h1>
|
||||
<h3>{error.message}</h3>
|
||||
<pre>{error.stack}</pre>
|
||||
<Button onClick={resetErrorBoundary}>OK</Button>
|
||||
<Button onClick={resetErrorBoundary}>{formatMessage(labels.ok)}</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue