1
1
mirror of https://github.com/theoludwig/p61-project.git synced 2024-07-17 07:00:12 +02:00

feat: add the pages we will use for the application

This commit is contained in:
Maxime Rumpler 2024-03-15 14:19:58 +01:00
parent d73711363f
commit 33f5ebec62
4 changed files with 111 additions and 0 deletions

View File

@ -30,6 +30,33 @@ const TabLayout: React.FC = () => {
},
}}
/>
<Tabs.Screen
name="newHabit"
options={{
title: "New Habit",
tabBarIcon: ({ color }) => {
return <TabBarIcon name="plus-square" color={color} />
},
}}
/>
<Tabs.Screen
name="history"
options={{
title: "History",
tabBarIcon: ({ color }) => {
return <TabBarIcon name="history" color={color} />
},
}}
/>
<Tabs.Screen
name="settings"
options={{
title: "Settings",
tabBarIcon: ({ color }) => {
return <TabBarIcon name="cog" color={color} />
},
}}
/>
<Tabs.Screen
name="login"
options={{

28
app/(pages)/history.tsx Normal file
View File

@ -0,0 +1,28 @@
import { StyleSheet } from "react-native"
import { Button } from "react-native-paper"
import { SafeAreaView } from "react-native-safe-area-context"
const History: React.FC = () => {
return (
<SafeAreaView style={styles.container}>
<Button
mode="contained"
onPress={() => {
return console.log("Pressed")
}}
>
Press me
</Button>
</SafeAreaView>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
justifyContent: "center",
},
})
export default History

28
app/(pages)/newHabit.tsx Normal file
View File

@ -0,0 +1,28 @@
import { StyleSheet } from "react-native"
import { Button } from "react-native-paper"
import { SafeAreaView } from "react-native-safe-area-context"
const NewHabitPage: React.FC = () => {
return (
<SafeAreaView style={styles.container}>
<Button
mode="contained"
onPress={() => {
return console.log("Pressed")
}}
>
Press me
</Button>
</SafeAreaView>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
justifyContent: "center",
},
})
export default NewHabitPage

28
app/(pages)/settings.tsx Normal file
View File

@ -0,0 +1,28 @@
import { StyleSheet } from "react-native"
import { Button } from "react-native-paper"
import { SafeAreaView } from "react-native-safe-area-context"
const Settings: React.FC = () => {
return (
<SafeAreaView style={styles.container}>
<Button
mode="contained"
onPress={() => {
return console.log("Pressed")
}}
>
Press me
</Button>
</SafeAreaView>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: "center",
justifyContent: "center",
},
})
export default Settings