feat(home): integrate PagerView for tab navigation and add verification redirect
Replace custom gesture handling with PagerView component for smoother tab switching on home screen. Add verification required redirects in API and WebSocket services that automatically navigate users to the verification guide when receiving VERIFICATION_REQUIRED error codes. BREAKING CHANGE: API and WS services now require router to be set via setExpoRouter/setRouter for navigation to work properly
This commit is contained in:
@@ -10,6 +10,8 @@ import * as Notifications from 'expo-notifications';
|
||||
import * as SystemUI from 'expo-system-ui';
|
||||
|
||||
import { registerNotificationPresentationHandler } from '../src/services/notificationPreferences';
|
||||
import { api } from '../src/services/api';
|
||||
import { wsService } from '../src/services/wsService';
|
||||
import {
|
||||
ThemeBootstrap,
|
||||
useAppColors,
|
||||
@@ -164,6 +166,11 @@ function ThemedStack() {
|
||||
const colors = useAppColors();
|
||||
const resolved = useResolvedColorScheme();
|
||||
|
||||
useEffect(() => {
|
||||
api.setExpoRouter(router);
|
||||
wsService.setRouter(router);
|
||||
}, [router]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<StatusBar style={resolved === 'dark' ? 'light' : 'dark'} />
|
||||
|
||||
Reference in New Issue
Block a user