Update CBS Mobile App codebase
This commit is contained in:
@@ -7,19 +7,30 @@ import { Provider } from 'react-redux';
|
||||
|
||||
import { store } from './src/app/store';
|
||||
import { RootNavigator } from './src/navigation/RootNavigator';
|
||||
import { ThemeProvider } from './src/theme';
|
||||
import { ThemeProvider, useTheme } from './src/theme';
|
||||
import { ToastHost } from './src/components/ToastHost';
|
||||
import { ActivityTracker } from './src/components/ActivityTracker';
|
||||
import { FeatureProvider, hydrateFeatures } from './src/features';
|
||||
import { useAppBootstrap } from './src/hooks/useAppBootstrap';
|
||||
|
||||
const AppShell = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
useAppBootstrap();
|
||||
|
||||
return (
|
||||
<>
|
||||
<StatusBar barStyle="light-content" translucent backgroundColor="transparent" />
|
||||
<ActivityTracker>
|
||||
{/*
|
||||
The app-wide default. Individual screens override it — a screen on the
|
||||
full-bleed navy wash forces light icons, because that wash is dark in
|
||||
both themes — but everything else sits on `colors.background`, and
|
||||
this follows the live theme so dark mode does not leave black icons on
|
||||
a near-black bar.
|
||||
*/}
|
||||
<StatusBar barStyle={theme.statusBarStyle} translucent backgroundColor="transparent" />
|
||||
<RootNavigator />
|
||||
<ToastHost />
|
||||
</>
|
||||
</ActivityTracker>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -28,9 +39,15 @@ export default function App() {
|
||||
<GestureHandlerRootView style={{ flex: 1 }}>
|
||||
<SafeAreaProvider>
|
||||
<Provider store={store}>
|
||||
<ThemeProvider>
|
||||
<AppShell />
|
||||
</ThemeProvider>
|
||||
{/* Reads the persisted local overrides and the bank's server-driven
|
||||
config before the navigators mount — they decide at mount time
|
||||
which screens to register, so a flag arriving later would leave a
|
||||
disabled route reachable until the next launch. */}
|
||||
<FeatureProvider hydrate={hydrateFeatures}>
|
||||
<ThemeProvider>
|
||||
<AppShell />
|
||||
</ThemeProvider>
|
||||
</FeatureProvider>
|
||||
</Provider>
|
||||
</SafeAreaProvider>
|
||||
</GestureHandlerRootView>
|
||||
|
||||
Reference in New Issue
Block a user