@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/stores/auth.ts +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.49",
3
+ "version": "1.1.50",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
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;