Skip to content

Commit 548a29d

Browse files
committed
feat: add RootLayout and Index components for application structure
1 parent 47a1318 commit 548a29d

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

app/_layout.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/app/_layout.tsx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Stack } from "expo-router";
2+
import { StatusBar } from "expo-status-bar";
3+
import React from "react";
4+
import { ActivityIndicator, Text, View } from "react-native";
5+
import { SafeAreaProvider } from "react-native-safe-area-context";
6+
import { Provider } from "react-redux";
7+
import { PersistGate } from "redux-persist/integration/react";
8+
9+
import { persistor, store } from "../store";
10+
11+
const LoadingComponent = () => (
12+
<View style={{ flex: 1, justifyContent: "center", alignItems: "center" }}>
13+
<ActivityIndicator size="large" color="#007AFF" />
14+
<Text style={{ marginTop: 16, fontSize: 16, color: "#8E8E93" }}>
15+
Loading Scriptian...
16+
</Text>
17+
</View>
18+
);
19+
20+
export default function RootLayout() {
21+
return (
22+
<Provider store={store}>
23+
<PersistGate loading={<LoadingComponent />} persistor={persistor}>
24+
<SafeAreaProvider>
25+
<StatusBar style="auto" />
26+
<Stack screenOptions={{ headerShown: false }}>
27+
<Stack.Screen name="index" />
28+
</Stack>
29+
</SafeAreaProvider>
30+
</PersistGate>
31+
</Provider>
32+
);
33+
}
File renamed without changes.

0 commit comments

Comments
 (0)