refactor(stores): reorganize flat store files into modular directory structure
Migrate from flat file organization to modular directory structure under src/stores/: - auth/: authStore, registerStore, verificationStore, sessionStore - call/: callStore - settings/: chatSettingsStore, themeStore - ui/: homeTabBarVisibilityStore, homeTabPressStore - utils/: routePayloadCache - group/sources.ts, group/profileResolver.ts - message/sources.ts - post/sources.ts Update all import paths across components and screens to use new module paths. Maintain backward compatibility through deprecated re-export files for gradual migration.
This commit is contained in:
@@ -27,7 +27,7 @@ import { PagerView } from '../../components/common';
|
||||
import { useAppColors, useResolvedColorScheme, spacing, borderRadius, shadows, type AppColors } from '../../theme';
|
||||
import { Post } from '../../types';
|
||||
import { useUserStore, useHomeTabBarVisibilityStore, useHomeTabPressStore } from '../../stores';
|
||||
import { useCurrentUser } from '../../stores/authStore';
|
||||
import { useCurrentUser } from '../../stores/auth';
|
||||
import { channelService, postService } from '../../services';
|
||||
import { PostCard, TabBar, SearchBar } from '../../components/business';
|
||||
import type { PostCardAction } from '../../components/business/PostCard';
|
||||
@@ -466,9 +466,9 @@ export const HomeScreen: React.FC = () => {
|
||||
|
||||
// 宽屏下内容最大宽度
|
||||
const contentMaxWidth = useMemo(() => {
|
||||
if (isWideScreen) return 800;
|
||||
if (isDesktop) return 720;
|
||||
if (isTablet) return 640;
|
||||
if (isWideScreen) return 1200;
|
||||
if (isDesktop) return 1000;
|
||||
if (isTablet) return 800;
|
||||
return width; // 移动端使用全宽
|
||||
}, [width, isTablet, isDesktop, isWideScreen]);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
} from '../../theme';
|
||||
import { Post, Comment, VoteResultDTO, VoteOptionDTO } from '../../types';
|
||||
import { useUserStore } from '../../stores';
|
||||
import { useCurrentUser } from '../../stores/authStore';
|
||||
import { useCurrentUser } from '../../stores/auth';
|
||||
import { postService, commentService, uploadService, authService, showPrompt, voteService } from '../../services';
|
||||
import { postSyncService } from '@/services/post';
|
||||
import { useCursorPagination } from '../../hooks/useCursorPagination';
|
||||
|
||||
Reference in New Issue
Block a user