fix(web): Add ScrollRestoration

This commit is contained in:
Prayag Prajapati committed 2024-02-19 22:13:24 +05:30
1 parent f13533dfc6
commit 1447e0033a
1 file changed
+2 -2
+2 -2
View File
@@ -8,6 +8,7 @@ import {
Outlet,
Route,
Routes,
ScrollRestoration,
useLocation,
useNavigate,
} from "react-router-dom";
@@ -250,8 +251,6 @@ function AppReady() {
const isQueryFetching = useIsFetching();
const isMutating = useIsMutating();
console.info(location.pathname + "----" + isQueryFetching);
useLayoutEffect(() => {
async function checkForUpdates() {
try {
@@ -289,6 +288,7 @@ function AppReady() {
<SnackbarProvider maxSnack={5}>
<ThemeProvider theme={theme}>
<CssBaseline />
<ScrollRestoration />
<NProgress
isAnimating={isQueryFetching}
key={isQueryFetching || isMutating ? "fetching" : "notFetching"}