添加标签页布局,创建主页和关于页组件,删除不再使用的索引和模态页
This commit is contained in:
10
app/(tabs)/_layout.tsx
Normal file
10
app/(tabs)/_layout.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Tabs } from 'expo-router';
|
||||
|
||||
export default function TabLayout() {
|
||||
return (
|
||||
<Tabs>
|
||||
<Tabs.Screen name="index" options={{ title: 'Home' }} />
|
||||
<Tabs.Screen name="about" options={{ title: 'About' }} />
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
5
app/(tabs)/about.tsx
Normal file
5
app/(tabs)/about.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function AboutRoute() {
|
||||
return <Text>About Route</Text>;
|
||||
}
|
||||
5
app/(tabs)/index.tsx
Normal file
5
app/(tabs)/index.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Text } from "react-native";
|
||||
|
||||
export default function IndexRoute() {
|
||||
return <Text>Index Route</Text>;
|
||||
}
|
||||
@@ -16,11 +16,7 @@ export default function RootLayout() {
|
||||
<AppBootstrapProvider>
|
||||
<ThemeProvider value={colorScheme === "dark" ? DarkTheme : DefaultTheme}>
|
||||
<Stack>
|
||||
<Stack.Screen name="index" options={{ headerShown: false }} />
|
||||
<Stack.Screen
|
||||
name="modal"
|
||||
options={{ presentation: "modal", title: "Modal" }}
|
||||
/>
|
||||
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
|
||||
</Stack>
|
||||
<StatusBar style="auto" />
|
||||
</ThemeProvider>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
import { HomeScreen } from "@/features/home/screens/home-screen";
|
||||
|
||||
export default function IndexRoute() {
|
||||
return <HomeScreen />;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
import { ModalScreen } from "@/features/system/screens/modal-screen";
|
||||
|
||||
export default function ModalRoute() {
|
||||
return <ModalScreen />;
|
||||
}
|
||||
Reference in New Issue
Block a user