瀏覽代碼

fix(app): force re-hydration of server configuration atoms on navigation

useHydrateAtoms only hydrates atoms once per store by default, so client-side
navigation after changing admin settings (e.g. page bulk export) left atoms
stale until a full browser refresh. Enable dangerouslyForceHydrate so SSR props
re-apply on every navigation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tomoyuki-t 1 周之前
父節點
當前提交
db7b0a5014
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/app/src/pages/general-page/hydrate.ts

+ 1 - 1
apps/app/src/pages/general-page/hydrate.ts

@@ -112,5 +112,5 @@ export const useHydrateGeneralPageConfigurationAtoms = (
           createAtomTuple(disableUserPagesAtom, serverConfig.disableUserPages),
         ];
 
-  useHydrateAtoms(tuples);
+  useHydrateAtoms(tuples, { dangerouslyForceHydrate: true });
 };