mirror of
https://github.com/hsjobeki/noogle.git
synced 2024-12-23 22:12:55 +03:00
fix logic issue on reset page state
This commit is contained in:
parent
89e19bc9e1
commit
754cb390f4
@ -80,7 +80,8 @@ export const PageContextProvider = (props: PageContextProviderProps) => {
|
||||
if (Object.entries(router.query).length !== 0) {
|
||||
router.push({ query: undefined });
|
||||
}
|
||||
setPageState((curr) => ({ ...curr, ...initialPageState }));
|
||||
// do not modify data
|
||||
setPageState((curr) => ({ ...curr, ...initialPageState, data: curr.data }));
|
||||
}
|
||||
return (
|
||||
<PageContext.Provider
|
||||
|
Loading…
Reference in New Issue
Block a user