perf: project-wide optimization pass + UI/theme fixes
Optimization (audited across src/, typecheck green): - Crash guards: PurchaseAuction data?.result + stray text-node, AuctionItemDetail length>0, LiveAuction user?.contractorId, KYC params guard - Hoisted render-defined components: Login MinimalInput (keyboard-focus bug), TenderFullDetail Section/InfoBox (subtree remount) - Memoized hot paths: Spreadsheet ColumnHeaderRow/DataRow, list makeStyles, shared infinite-query select (stops per-render flatMap) - Removed hot-path/in-list console logs; SkeletonList 10->1 shimmer UI/theme: themed AppToast, redesigned sidebar drawer, list empty states, KYC WebView cleanup Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
7853bab639
commit
95d8e0a925
@@ -2,7 +2,6 @@ import React from 'react';
|
||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||
import { View } from 'react-native';
|
||||
import { QueryClientProvider } from '@tanstack/react-query';
|
||||
import { AlertNotificationRoot } from 'react-native-alert-notification';
|
||||
import { PersistGate } from 'redux-persist/integration/react';
|
||||
import { Provider } from 'react-redux';
|
||||
import { persistor, store } from './src/Redux/Store';
|
||||
@@ -11,29 +10,35 @@ import { NavigationContainer } from '@react-navigation/native';
|
||||
import colors from './src/Constant/Color';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import AppStatusBar from './src/components/AppStatusBar';
|
||||
import { ApiToastBridge, AppToastHost } from './src/components/AppToast';
|
||||
import { ErrorBoundary } from './src/core/errors/ErrorBoundary';
|
||||
import { queryClient } from './src/core/query/queryClient';
|
||||
import AuthSessionGuard from './src/Navigation/AuthSessionGuard';
|
||||
import { navigationRef } from './src/Navigation/NavigationService';
|
||||
import { applyGuardForCurrentRoute } from './src/core/security/screenGuard';
|
||||
|
||||
const App = () => {
|
||||
const insets = useSafeAreaInsets();
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<NavigationContainer ref={navigationRef}>
|
||||
<NavigationContainer
|
||||
ref={navigationRef}
|
||||
onReady={applyGuardForCurrentRoute}
|
||||
onStateChange={applyGuardForCurrentRoute}
|
||||
>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<AlertNotificationRoot>
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor}>
|
||||
<View style={{ flex: 1, backgroundColor: colors.white, paddingBottom: insets.bottom }}>
|
||||
<AppStatusBar />
|
||||
<AuthSessionGuard />
|
||||
<Routes />
|
||||
</View>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
</AlertNotificationRoot>
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor}>
|
||||
<View style={{ flex: 1, backgroundColor: colors.white, paddingBottom: insets.bottom }}>
|
||||
<AppStatusBar />
|
||||
<AuthSessionGuard />
|
||||
<Routes />
|
||||
<ApiToastBridge />
|
||||
<AppToastHost />
|
||||
</View>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
</GestureHandlerRootView>
|
||||
</QueryClientProvider>
|
||||
</NavigationContainer>
|
||||
|
||||
Reference in New Issue
Block a user