fix: streamline error handling and clean up unused imports

- Simplified error handling in `LoginPage` by removing the error parameter in the catch block.
- Removed unused import of `cn` in `KeyboardShortcutsModal` to clean up the code.
- Updated `UserPreferencesContext` to only destructure `status` from `useSession`, improving clarity.
- Refactored multiple methods in `UserPreferencesService` to eliminate unnecessary variable assignments, enhancing performance.
- Added ESLint directive to suppress unused variable warning for `NextAuth` import in type definitions.
This commit is contained in:
Julien Froidefond
2025-09-30 22:20:57 +02:00
parent 30aaca4877
commit 7aa9d6dd6b
5 changed files with 14 additions and 14 deletions

View File

@@ -78,7 +78,7 @@ export function UserPreferencesProvider({ children, initialPreferences }: UserPr
const [preferences, setPreferences] = useState<UserPreferences>(initialPreferences || defaultPreferences);
const [isPending, startTransition] = useTransition();
const { theme, toggleTheme: themeToggleTheme, setTheme: themeSetTheme } = useTheme();
const { data: session, status } = useSession();
const { status } = useSession();
// Fonction pour charger les préférences côté client
const loadUserPreferences = useCallback(async () => {