Reload page after navigation after error (#1795)
This commit is contained in:
parent
f8254fd11b
commit
517d3f9400
1 changed files with 6 additions and 1 deletions
|
@ -149,14 +149,19 @@ const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
|
|||
const handleMenuItemClick = (url: string) =>
|
||||
navigate(url, { resetScroll: true });
|
||||
|
||||
const reloadWindow = () => {
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
const handleErrorBack = () => {
|
||||
navigate("/");
|
||||
navigate("/", { replace: true });
|
||||
dispatchAppState({
|
||||
payload: {
|
||||
error: null
|
||||
},
|
||||
type: "displayError"
|
||||
});
|
||||
reloadWindow();
|
||||
};
|
||||
|
||||
const toggleTheme = () => setTheme(isDarkTheme(themeType) ? "light" : "dark");
|
||||
|
|
Loading…
Reference in a new issue