first commit

This commit is contained in:
2026-03-01 10:59:07 +01:00
commit f6ed0ee437
29 changed files with 11890 additions and 0 deletions

48
mobile/App.tsx Normal file
View File

@@ -0,0 +1,48 @@
import { StatusBar } from "expo-status-bar";
import { StyleSheet, View } from "react-native";
import { BottomNav } from "./src/components/BottomNav";
import { NotFoundPage } from "./src/pages/NotFound";
import { IndexPage } from "./src/pages/index";
import { Route, RouterProvider, useRouter } from "./src/router";
interface Tab {
label: string;
route: Route;
page: React.ComponentType;
}
const TABS: Tab[] = [{ label: "Home", route: "home", page: IndexPage }];
export { TABS, type Tab };
function Screen() {
const { route } = useRouter();
return (
<>
{TABS.map((tab) => {
if (tab.route === route) {
const Page = tab.page;
return <Page key={tab.route} />;
}
return null;
})}
{!TABS.some((tab) => tab.route === route) && <NotFoundPage />}
</>
);
}
export default function App() {
return (
<RouterProvider>
<View style={styles.container}>
<StatusBar style="auto" />
<Screen />
<BottomNav />
</View>
</RouterProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
},
});