fix: move PyodideWebView into Import tab; fix micropip blob URL error
Layout fix: WebView as a sibling in the root layout breaks flex geometry even with position:absolute. Moving it inside the Import tab screen (which Expo Router keeps mounted after first visit) eliminates the issue entirely and restores the original simple root layout. micropip fix: blob: URLs are not a recognised scheme in micropip — they are parsed as package requirement strings, producing InvalidRequirement. Write the wheel bytes to Pyodide's Emscripten FS (/tmp/bincio.whl) and install via emfs:/// instead.
This commit is contained in:
+4
-15
@@ -1,24 +1,13 @@
|
||||
import { Stack } from 'expo-router';
|
||||
import { SQLiteProvider } from 'expo-sqlite';
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { migrateDb } from '@/db';
|
||||
import { PyodideWebView } from '@/extraction/PyodideWebView';
|
||||
|
||||
export default function RootLayout() {
|
||||
return (
|
||||
<View style={styles.root}>
|
||||
{/* Hidden WebView: starts loading Pyodide immediately so the runtime
|
||||
is warm by the time the user opens the Import tab. */}
|
||||
<PyodideWebView />
|
||||
<SQLiteProvider databaseName="bincio.db" onInit={migrateDb}>
|
||||
<StatusBar style="light" />
|
||||
<Stack screenOptions={{ headerShown: false }} />
|
||||
</SQLiteProvider>
|
||||
</View>
|
||||
<SQLiteProvider databaseName="bincio.db" onInit={migrateDb}>
|
||||
<StatusBar style="light" />
|
||||
<Stack screenOptions={{ headerShown: false }} />
|
||||
</SQLiteProvider>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: { flex: 1 },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user