@mundogamernetwork/shared-ui 1.1.49 → 1.1.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/stores/auth.ts +6 -1
package/package.json
CHANGED
package/stores/auth.ts
CHANGED
|
@@ -71,8 +71,13 @@ export const useAuthStore = defineStore({
|
|
|
71
71
|
userId: (state) => (state.user ? state.user.id : null),
|
|
72
72
|
isSignedIn: (state) => state.signedIn,
|
|
73
73
|
},
|
|
74
|
+
// Persisted via pinia-plugin-persistedstate when the consuming app registers
|
|
75
|
+
// the module; storage is left as the plugin default (localStorage, SSR-safe)
|
|
76
|
+
// so this store does NOT reference the `persistedState` global. Referencing it
|
|
77
|
+
// threw "persistedState is not defined" during SSR on fronts that consume this
|
|
78
|
+
// layer without the module (the base, network-site, never had it). Fronts with
|
|
79
|
+
// the module still persist; fronts without it simply skip persistence, no crash.
|
|
74
80
|
persist: {
|
|
75
|
-
storage: persistedState.localStorage,
|
|
76
81
|
pick: ["user", "signedIn"],
|
|
77
82
|
afterHydrate: ({ store }) => {
|
|
78
83
|
store.initialized = false;
|