memos/web/src/hooks/index.ts
Steven 3dc740c752 refactor(web): improve locale/theme preference initialization
- Extract preference logic into dedicated hooks (useUserLocale, useUserTheme)
- Add applyLocaleEarly() for consistent early application
- Remove applyUserPreferences() from user store (now redundant)
- Simplify App.tsx by moving effects to custom hooks
- Make locale/theme handling consistent and reactive
- Clean up manual preference calls from sign-in flows

Fixes locale not overriding localStorage on user login.
Improves maintainability with better separation of concerns.
2025-12-11 07:59:52 +08:00

10 lines
342 B
TypeScript

export * from "./useAsyncEffect";
export * from "./useCurrentUser";
export * from "./useFilteredMemoStats";
export * from "./useLoading";
export * from "./useMemoFilters";
export * from "./useMemoSorting";
export * from "./useNavigateTo";
export * from "./useResponsiveWidth";
export * from "./useUserLocale";
export * from "./useUserTheme";