diff --git a/app/application/_layout.tsx b/app/application/_layout.tsx index 1bf47a0..0bc2965 100644 --- a/app/application/_layout.tsx +++ b/app/application/_layout.tsx @@ -43,11 +43,11 @@ const TabLayout: React.FC = () => { }} /> { - return + return }, }} /> diff --git a/app/application/habits/history.tsx b/app/application/habits/history.tsx deleted file mode 100644 index b4497fa..0000000 --- a/app/application/habits/history.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { useMemo, useState } from "react" -import { View } from "react-native" -import { Agenda } from "react-native-calendars" -import { Text } from "react-native-paper" -import { SafeAreaView } from "react-native-safe-area-context" - -import { getISODate, getNowDate } from "@/utils/dates" - -const HistoryPage: React.FC = () => { - const today = useMemo(() => { - return getNowDate() - }, []) - const todayISO = getISODate(today) - - const [selectedDate, setSelectedDate] = useState(today) - const selectedISODate = getISODate(selectedDate) - - return ( - - { - setSelectedDate(new Date(date.dateString)) - }} - markedDates={{ - [todayISO]: { marked: true }, - }} - selected={selectedISODate} - renderList={() => { - return ( - - {selectedDate.toISOString()} - - ) - }} - /> - - ) -} - -export default HistoryPage diff --git a/app/application/habits/stats.tsx b/app/application/habits/stats.tsx new file mode 100644 index 0000000..ddb24e4 --- /dev/null +++ b/app/application/habits/stats.tsx @@ -0,0 +1,14 @@ +import { Stats } from "@/presentation/react/components/Stats/Stats" +import { useAuthentication } from "@/presentation/react/contexts/Authentication" + +const StatsPage: React.FC = () => { + const { user } = useAuthentication() + + if (user == null) { + return null + } + + return +} + +export default StatsPage diff --git a/presentation/react/components/Stats/Stats.tsx b/presentation/react/components/Stats/Stats.tsx new file mode 100644 index 0000000..00b00e1 --- /dev/null +++ b/presentation/react/components/Stats/Stats.tsx @@ -0,0 +1,35 @@ +import { SafeAreaView } from "react-native-safe-area-context" +import { Card, Text } from "react-native-paper" + +export const Stats: React.FC = () => { + return ( + + {"Statistique"} + + + + + nbDays Sucess that follow + + + + + + nbDays Sucess + + + + + + nbDays Fail + + + + + + CardContent + + + + ) +}