Fix Auth Errors

This commit is contained in:
Eric Gullickson
2025-09-22 10:27:10 -05:00
parent 3588372cef
commit 8fd7973656
19 changed files with 1342 additions and 174 deletions

View File

@@ -1,5 +1,6 @@
import { create } from 'zustand';
import { persist, createJSONStorage } from 'zustand/middleware';
import { safeStorage } from '../utils/safe-storage';
interface UserPreferences {
unitSystem: 'imperial' | 'metric';
@@ -90,7 +91,7 @@ export const useUserStore = create<UserState>()(
}),
{
name: 'motovaultpro-user-context',
storage: createJSONStorage(() => localStorage),
storage: createJSONStorage(() => safeStorage),
partialize: (state) => ({
userProfile: state.userProfile,
preferences: state.preferences,