Skip to content

Commit

Permalink
refactor: simplify ErrorFallback component by removing Button which w…
Browse files Browse the repository at this point in the history
…as agreed to be redundant
  • Loading branch information
ThomasGross committed Jan 21, 2025
1 parent 67f9534 commit 7631b68
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

import { ErrorBoundary } from "react-error-boundary"

import { Button } from "../../shared/button/Button"

function ErrorFallback({ resetErrorBoundary }: { resetErrorBoundary: () => void }) {
function ErrorFallback() {
return (
<div className="flex h-[200px] w-full flex-col items-center justify-center">
<div className="flex h-[200px] w-full flex-col items-center justify-center bg-background-overlay">
<p>Noget gik galt ved visning af denne blok - måske den mangler indhold?</p>
<Button className="mt-4" onClick={resetErrorBoundary}>
Genindlæs
</Button>
</div>
)
}
Expand Down

0 comments on commit 7631b68

Please sign in to comment.