diff --git a/app/application/_layout.tsx b/app/application/_layout.tsx index 8f2eb1b..1bf47a0 100644 --- a/app/application/_layout.tsx +++ b/app/application/_layout.tsx @@ -36,6 +36,12 @@ const TabLayout: React.FC = () => { }, }} /> + { + return +} + +export default HabitLayout diff --git a/app/application/habits/[habitId]/index.tsx b/app/application/habits/[habitId]/index.tsx new file mode 100644 index 0000000..aeaa0c2 --- /dev/null +++ b/app/application/habits/[habitId]/index.tsx @@ -0,0 +1,22 @@ +import { useLocalSearchParams } from "expo-router" +import { Text } from "react-native-paper" +import { SafeAreaView } from "react-native-safe-area-context" + +const HabitPage: React.FC = () => { + const { habitId } = useLocalSearchParams() + + return ( + + Habit Page {habitId} + + ) +} + +export default HabitPage diff --git a/app/application/habits/history.tsx b/app/application/habits/history.tsx index ffcae32..4513654 100644 --- a/app/application/habits/history.tsx +++ b/app/application/habits/history.tsx @@ -1,5 +1,4 @@ import { useState } from "react" -import { StyleSheet } from "react-native" import { Calendar } from "react-native-calendars" import { SafeAreaView } from "react-native-safe-area-context" @@ -7,7 +6,15 @@ const HistoryPage: React.FC = () => { const [selected, setSelected] = useState("") return ( - + { setSelected(day.dateString) @@ -37,12 +44,4 @@ const HistoryPage: React.FC = () => { ) } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - }, -}) - export default HistoryPage diff --git a/app/application/habits/index.tsx b/app/application/habits/index.tsx index 04ce75b..46a36e9 100644 --- a/app/application/habits/index.tsx +++ b/app/application/habits/index.tsx @@ -1,79 +1,23 @@ -import FontAwesome6 from "@expo/vector-icons/FontAwesome6" -import { FlatList, StyleSheet } from "react-native" -import { List } from "react-native-paper" import { SafeAreaView } from "react-native-safe-area-context" +import { HabitsHistory } from "@/presentation/react/components/HabitsHistory/HabitsHistory" import { useHabitsTracker } from "@/presentation/react/contexts/HabitsTracker" -import { colorsPresenter } from "@/presentation/presenters/utils/ColorsPresenter" const HabitsPage: React.FC = () => { const { habitsTracker } = useHabitsTracker() return ( - - - { - const { habit } = item - - return ( - { - return ( - - ) - }} - /> - ) - }} - /> - + + ) } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - }, - habitsList: { - width: "90%", - }, - habitItem: { - paddingVertical: 20, - paddingHorizontal: 10, - marginVertical: 10, - borderRadius: 10, - }, - habitItemIcon: { - width: 30, - }, -}) - export default HabitsPage diff --git a/app/application/habits/new.tsx b/app/application/habits/new.tsx index 5d6ac05..053a29a 100644 --- a/app/application/habits/new.tsx +++ b/app/application/habits/new.tsx @@ -1,21 +1,20 @@ -import { StyleSheet } from "react-native" import { Text } from "react-native-paper" import { SafeAreaView } from "react-native-safe-area-context" const NewHabitPage: React.FC = () => { return ( - + New Habit ) } -const styles = StyleSheet.create({ - container: { - flex: 1, - alignItems: "center", - justifyContent: "center", - }, -}) - export default NewHabitPage diff --git a/app/application/users/settings.tsx b/app/application/users/settings.tsx index dc59f25..1a4b9f9 100644 --- a/app/application/users/settings.tsx +++ b/app/application/users/settings.tsx @@ -1,4 +1,4 @@ -import { StyleSheet, Text } from "react-native" +import { Text } from "react-native" import { Button } from "react-native-paper" import { SafeAreaView } from "react-native-safe-area-context" @@ -12,7 +12,15 @@ const SettingsPage: React.FC = () => { } return ( - + Settings