mirror of
https://github.com/traefik/traefik.git
synced 2026-06-18 03:20:34 +03:00
21 lines
547 B
TypeScript
21 lines
547 B
TypeScript
import { Box, Button, Text } from '@traefik-labs/faency'
|
|
import { FallbackProps } from 'react-error-boundary'
|
|
|
|
const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => {
|
|
return (
|
|
<Box role="alert">
|
|
<Box css={{ mb: '$2' }}>
|
|
<Text as="p">Something went wrong:</Text>
|
|
</Box>
|
|
<Box css={{ mb: '$2' }}>
|
|
<Text variant="red">{error.message}</Text>
|
|
</Box>
|
|
<Button type="button" onClick={resetErrorBoundary}>
|
|
Try again
|
|
</Button>
|
|
</Box>
|
|
)
|
|
}
|
|
|
|
export default ErrorFallback
|