diff --git a/app/_layout.tsx b/app/_layout.tsx index 2abb980..5130169 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -6,6 +6,7 @@ import { } from "react-native-paper" import { StatusBar } from "expo-status-bar" import { useEffect } from "react" +import { GestureHandlerRootView } from "react-native-gesture-handler" import { HabitsTrackerProvider } from "@/presentation/react/contexts/HabitsTracker" import { @@ -61,7 +62,9 @@ const RootLayout: React.FC = () => { }, }} > - + + + diff --git a/app/application/habits/index.tsx b/app/application/habits/index.tsx index daeb46d..1a8f487 100644 --- a/app/application/habits/index.tsx +++ b/app/application/habits/index.tsx @@ -30,7 +30,8 @@ const HabitsPage: React.FC = () => { ) : retrieveHabitsTracker.state === "error" ? ( <> - Error: There was an issue while retrieving habits, please try again. + Error: There was an issue while retrieving habits, please try again + later. + - { - return ( - - ) - }} - name="icon" - /> - - { - return ( - <> - Habit frequency - { - return { - label: capitalize(frequency), - value: frequency, - icon: frequenciesIcons[frequency], - } - })} - /> - - ) - }} - name="goal.frequency" - /> - - { - return ( - <> - Habit type - { - return { - label: habitTypesTranslations[type].label, - value: type, - icon: habitTypesTranslations[type].icon, - } - })} - /> - - ) - }} - name="goal.target.type" - /> - - + ✅ Habit created successfully! + ) } -const styles = { - input: { - margin: 8, +const styles = StyleSheet.create({ + spacing: { + marginVertical: 16, }, -} +}) diff --git a/presentation/react/components/HabitsHistory/HabitsHistory.tsx b/presentation/react/components/HabitsHistory/HabitsHistory.tsx index 952ff1d..b9e7ac4 100644 --- a/presentation/react/components/HabitsHistory/HabitsHistory.tsx +++ b/presentation/react/components/HabitsHistory/HabitsHistory.tsx @@ -1,7 +1,7 @@ +import { useRouter } from "expo-router" +import { useMemo, useState } from "react" import { FlatList, View } from "react-native" import { Button, List, Text } from "react-native-paper" -import { useMemo, useState } from "react" -import { useRouter } from "expo-router" import type { GoalFrequency } from "@/domain/entities/Goal" import { GOAL_FREQUENCIES } from "@/domain/entities/Goal"