mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
35 lines
845 B
TypeScript
35 lines
845 B
TypeScript
|
import { StyleSheet, Text, View } from "react-native"
|
||
|
import { SafeAreaView } from "react-native-safe-area-context"
|
||
|
|
||
|
import { useHabitsTracker } from "@/contexts/HabitsTracker"
|
||
|
|
||
|
const HabitsPage: React.FC = () => {
|
||
|
const { habitsTrackerPresenterState } = useHabitsTracker()
|
||
|
const { habitsTracker } = habitsTrackerPresenterState
|
||
|
const { habitProgressHistories } = habitsTracker
|
||
|
|
||
|
return (
|
||
|
<SafeAreaView style={styles.container}>
|
||
|
{habitProgressHistories.map((progressHistory) => {
|
||
|
const { habit } = progressHistory
|
||
|
|
||
|
return (
|
||
|
<View key={habit.id}>
|
||
|
<Text>{habit.name}</Text>
|
||
|
</View>
|
||
|
)
|
||
|
})}
|
||
|
</SafeAreaView>
|
||
|
)
|
||
|
}
|
||
|
|
||
|
const styles = StyleSheet.create({
|
||
|
container: {
|
||
|
flex: 1,
|
||
|
alignItems: "center",
|
||
|
justifyContent: "center",
|
||
|
},
|
||
|
})
|
||
|
|
||
|
export default HabitsPage
|