2024-03-15 23:24:08 +01:00
|
|
|
import { StyleSheet, Text, View } from "react-native"
|
|
|
|
import { SafeAreaView } from "react-native-safe-area-context"
|
|
|
|
|
2024-03-16 00:36:44 +01:00
|
|
|
import { useHabitsTracker } from "@/presentation/react/contexts/HabitsTracker"
|
2024-03-15 23:24:08 +01:00
|
|
|
|
|
|
|
const HabitsPage: React.FC = () => {
|
2024-03-16 00:36:44 +01:00
|
|
|
const { habitsTracker } = useHabitsTracker()
|
2024-03-15 23:24:08 +01:00
|
|
|
|
|
|
|
return (
|
|
|
|
<SafeAreaView style={styles.container}>
|
2024-03-16 00:36:44 +01:00
|
|
|
{habitsTracker.habitsHistory.map((progressHistory) => {
|
2024-03-15 23:24:08 +01:00
|
|
|
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
|