fix(app): remove initial workspace white flash

This commit is contained in:
Mohamed Boudra
2026-03-06 23:55:39 +07:00
parent efa6a6aed3
commit 6b51088f39
2 changed files with 16 additions and 1 deletions

View File

@@ -7,13 +7,18 @@ import "../styles/unistyles";
const webEcosystemStyles = /* css */ ` const webEcosystemStyles = /* css */ `
html { html {
touch-action: auto; touch-action: auto;
height: 100%;
background-color: #18181c;
color-scheme: dark;
} }
body { body {
min-height: 100%;
overflow: auto; overflow: auto;
overscroll-behavior: contain; overscroll-behavior: contain;
-webkit-user-select: text; -webkit-user-select: text;
user-select: text; user-select: text;
background-color: #18181c;
} }
body * { body * {
@@ -36,6 +41,11 @@ const webEcosystemStyles = /* css */ `
width: 0; width: 0;
height: 0; height: 0;
} }
#root {
min-height: 100%;
background-color: #18181c;
}
`; `;
function WebRespectfulStyleReset() { function WebRespectfulStyleReset() {

View File

@@ -448,7 +448,9 @@ function MissingDaemonView() {
export default function RootLayout() { export default function RootLayout() {
return ( return (
<GestureHandlerRootView style={{ flex: 1 }}> <GestureHandlerRootView
style={{ flex: 1, backgroundColor: darkTheme.colors.surface0 }}
>
<PerfDiagnosticsProvider scope="root_layout"> <PerfDiagnosticsProvider scope="root_layout">
<PortalProvider> <PortalProvider>
<SafeAreaProvider> <SafeAreaProvider>
@@ -467,6 +469,9 @@ export default function RootLayout() {
screenOptions={{ screenOptions={{
headerShown: false, headerShown: false,
animation: "none", animation: "none",
contentStyle: {
backgroundColor: darkTheme.colors.surface0,
},
}} }}
> >
<Stack.Screen name="index" /> <Stack.Screen name="index" />