Initialize Expo mobile app with tab navigation and monorepo support
- Expo managed project at apps/mobile/ with TypeScript - Expo Router with 4 tabs: Map, Routes, Activities, Profile - app.config.ts with monorepo experiment, bundle IDs, scheme - Workspace packages linked: api, gpx, i18n, map-core, types - Profile tab imports API_VERSION from @trails-cool/api to verify shared package resolution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
48f990f4ec
commit
95fdbfee2f
17 changed files with 5439 additions and 31 deletions
41
apps/mobile/app/(tabs)/_layout.tsx
Normal file
41
apps/mobile/app/(tabs)/_layout.tsx
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import { Tabs } from "expo-router";
|
||||
|
||||
export default function TabLayout() {
|
||||
return (
|
||||
<Tabs
|
||||
screenOptions={{
|
||||
tabBarActiveTintColor: "#4A6B40",
|
||||
headerShown: false,
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen
|
||||
name="index"
|
||||
options={{
|
||||
title: "Map",
|
||||
tabBarIcon: () => null,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="routes"
|
||||
options={{
|
||||
title: "Routes",
|
||||
tabBarIcon: () => null,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="activities"
|
||||
options={{
|
||||
title: "Activities",
|
||||
tabBarIcon: () => null,
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="profile"
|
||||
options={{
|
||||
title: "Profile",
|
||||
tabBarIcon: () => null,
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
);
|
||||
}
|
||||
14
apps/mobile/app/(tabs)/activities.tsx
Normal file
14
apps/mobile/app/(tabs)/activities.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { View, Text, StyleSheet } from "react-native";
|
||||
|
||||
export default function ActivitiesScreen() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Activities</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: { flex: 1, justifyContent: "center", alignItems: "center" },
|
||||
text: { fontSize: 18, color: "#666" },
|
||||
});
|
||||
14
apps/mobile/app/(tabs)/index.tsx
Normal file
14
apps/mobile/app/(tabs)/index.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { View, Text, StyleSheet } from "react-native";
|
||||
|
||||
export default function MapScreen() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Map</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: { flex: 1, justifyContent: "center", alignItems: "center" },
|
||||
text: { fontSize: 18, color: "#666" },
|
||||
});
|
||||
17
apps/mobile/app/(tabs)/profile.tsx
Normal file
17
apps/mobile/app/(tabs)/profile.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { View, Text, StyleSheet } from "react-native";
|
||||
import { API_VERSION } from "@trails-cool/api";
|
||||
|
||||
export default function ProfileScreen() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Profile</Text>
|
||||
<Text style={styles.version}>API v{API_VERSION}</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: { flex: 1, justifyContent: "center", alignItems: "center" },
|
||||
text: { fontSize: 18, color: "#666" },
|
||||
version: { fontSize: 12, color: "#999", marginTop: 8 },
|
||||
});
|
||||
14
apps/mobile/app/(tabs)/routes.tsx
Normal file
14
apps/mobile/app/(tabs)/routes.tsx
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { View, Text, StyleSheet } from "react-native";
|
||||
|
||||
export default function RoutesScreen() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Text style={styles.text}>Routes</Text>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: { flex: 1, justifyContent: "center", alignItems: "center" },
|
||||
text: { fontSize: 18, color: "#666" },
|
||||
});
|
||||
5
apps/mobile/app/_layout.tsx
Normal file
5
apps/mobile/app/_layout.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { Stack } from "expo-router";
|
||||
|
||||
export default function RootLayout() {
|
||||
return <Stack screenOptions={{ headerShown: false }} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue