Migrate Traefik Proxy dashboard UI to React
This commit is contained in:
parent
4790e4910f
commit
f16fff577a
324 changed files with 28303 additions and 19567 deletions
20
webui/src/layout/ErrorFallback.tsx
Normal file
20
webui/src/layout/ErrorFallback.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Box, Button, Text } from '@traefiklabs/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue