Skip to content
Snippets Groups Projects
Commit a5455f39 authored by RICHARD MAXIME's avatar RICHARD MAXIME
Browse files

fix: first add in daily, weekly or monthly

parent 17c1c104
Branches
Tags
1 merge request!3fix: first add in daily, weekly or monthly
Pipeline #187034 passed with stage
in 57 seconds
import { useRouter } from "expo-router"
import { useMemo, useState } from "react"
import { View, ScrollView, Dimensions } from "react-native"
import { useState } from "react"
import { Dimensions, ScrollView, View } from "react-native"
import { Button, List, Text } from "react-native-paper"
import type { GoalFrequency } from "@/domain/entities/Goal"
......@@ -18,11 +18,9 @@ export const HabitsMainPage: React.FC<HabitsMainPageProps> = (props) => {
const router = useRouter()
const habitsByFrequency = useMemo(() => {
return GOAL_FREQUENCIES.filter((frequency) => {
return habitsTracker.habitsHistory[frequency].length > 0
})
}, [habitsTracker])
const habitsByFrequency = GOAL_FREQUENCIES.filter((frequency) => {
return habitsTracker.habitsHistory[frequency].length > 0
})
const [accordionExpanded, setAccordionExpanded] = useState<{
[key in GoalFrequency]: boolean
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment