Screens: - LoginScreen / RegisterScreen (with mandatory consents checkboxes) - MapScreen — MAIN screen after login (Google Maps on Android, Apple Maps on iOS) * shows nearby users within radius * visibility toggle (hide/show myself on map) * radius selector 1/5/10/25/50 km * GPS auto-update with permission flow - ChatListScreen / ChatScreen with WebSocket realtime * long-press message: edit/delete * 'ред.' marker for edited messages * mark as read - ProfileScreen — bio, city, gender, drinks, activities, purposes State: Zustand (auth, map stores) HTTP: axios + JWT interceptor + token refresh WS: socket.io-client Storage: AsyncStorage for tokens Maps: react-native-maps Permissions: react-native-permissions
25 lines
702 B
TypeScript
25 lines
702 B
TypeScript
import React, { useEffect } from 'react';
|
|
import { StatusBar } from 'react-native';
|
|
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
import { useAuth } from '@/store/auth';
|
|
import RootNavigation from '@/navigation';
|
|
import { Colors } from '@/theme/colors';
|
|
|
|
export default function App() {
|
|
const { boot } = useAuth();
|
|
|
|
useEffect(() => {
|
|
boot();
|
|
}, []);
|
|
|
|
return (
|
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
<SafeAreaProvider>
|
|
<StatusBar barStyle="dark-content" backgroundColor={Colors.bg} />
|
|
<RootNavigation />
|
|
</SafeAreaProvider>
|
|
</GestureHandlerRootView>
|
|
);
|
|
}
|