Skip to content

Commit

Permalink
fix(form): add reload button to error boundary
Browse files Browse the repository at this point in the history
Closes cern-sis#93

Adds a reload page button to error boundary
Temporary "solution" to the SchemaTree update issue when loading schemas
  • Loading branch information
miguelgrc committed Dec 11, 2024
1 parent f8291c9 commit 47e5873
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/forms/FormErrorBoundary.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Alert, Typography } from "antd";
import { Alert, Button, Typography } from "antd";
import { ReloadOutlined } from "@ant-design/icons";

const { ErrorBoundary } = Alert;

Expand Down Expand Up @@ -39,6 +40,13 @@ const FormErrorBoundary = ({ children }) => (
</li>
</ul>
</Typography.Paragraph>
<Button
icon={<ReloadOutlined />}
onClick={() => window.location.reload()}
block
>
Reload page
</Button>
</div>
}
>
Expand Down

0 comments on commit 47e5873

Please sign in to comment.