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:
@@ -26,7 +26,7 @@ import {
|
||||
useChatSettingsStore,
|
||||
useChatSettingsActions,
|
||||
CHAT_THEMES,
|
||||
} from '../../stores/chatSettingsStore';
|
||||
} from '../../stores/settings';
|
||||
|
||||
const { width: SCREEN_WIDTH } = Dimensions.get('window');
|
||||
const CARD_MAX_WIDTH = 720;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import React from 'react';
|
||||
import { useLocalSearchParams } from 'expo-router';
|
||||
import UserProfileScreen from './UserProfileScreen';
|
||||
import { useCurrentUser } from '../../stores/authStore';
|
||||
import { useCurrentUser } from '../../stores/auth';
|
||||
|
||||
export const UserScreen: React.FC = () => {
|
||||
const { userId: userIdParam } = useLocalSearchParams<{ userId?: string }>();
|
||||
|
||||
@@ -22,7 +22,7 @@ import {
|
||||
useVerificationStore,
|
||||
useVerificationStatus,
|
||||
useVerificationLoading,
|
||||
} from '../../stores/verificationStore';
|
||||
} from '../../stores/auth';
|
||||
import { showPrompt } from '@/services/ui';
|
||||
import * as hrefs from '../../navigation/hrefs';
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import { spacing, type AppColors } from '../../theme';
|
||||
import { Post, User } from '../../types';
|
||||
import { useUserStore } from '../../stores';
|
||||
import { useCurrentUser } from '../../stores/authStore';
|
||||
import { useCurrentUser } from '../../stores/auth';
|
||||
import { postService, authService, messageService } from '../../services';
|
||||
import { postSyncService } from '@/services/post';
|
||||
import { userManager } from '../../stores/userManager';
|
||||
import { userManager } from '../../stores/user';
|
||||
import * as hrefs from '../../navigation/hrefs';
|
||||
import { PostCardAction } from '../../components/business/PostCard';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user