fix: wrap root layout in flex:1 View so Stack fills full screen alongside hidden WebView
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
import { Stack } from 'expo-router';
|
import { Stack } from 'expo-router';
|
||||||
import { SQLiteProvider } from 'expo-sqlite';
|
import { SQLiteProvider } from 'expo-sqlite';
|
||||||
import { StatusBar } from 'expo-status-bar';
|
import { StatusBar } from 'expo-status-bar';
|
||||||
|
import { StyleSheet, View } from 'react-native';
|
||||||
import { migrateDb } from '@/db';
|
import { migrateDb } from '@/db';
|
||||||
import { PyodideWebView } from '@/extraction/PyodideWebView';
|
import { PyodideWebView } from '@/extraction/PyodideWebView';
|
||||||
|
|
||||||
export default function RootLayout() {
|
export default function RootLayout() {
|
||||||
return (
|
return (
|
||||||
<>
|
<View style={styles.root}>
|
||||||
{/* Hidden WebView: starts loading Pyodide immediately so the runtime
|
{/* Hidden WebView: starts loading Pyodide immediately so the runtime
|
||||||
is warm by the time the user opens the Import tab. */}
|
is warm by the time the user opens the Import tab. */}
|
||||||
<PyodideWebView />
|
<PyodideWebView />
|
||||||
@@ -14,6 +15,10 @@ export default function RootLayout() {
|
|||||||
<StatusBar style="light" />
|
<StatusBar style="light" />
|
||||||
<Stack screenOptions={{ headerShown: false }} />
|
<Stack screenOptions={{ headerShown: false }} />
|
||||||
</SQLiteProvider>
|
</SQLiteProvider>
|
||||||
</>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
root: { flex: 1 },
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user