mirror of
https://github.com/theoludwig/p61-project.git
synced 2024-07-17 07:00:12 +02:00
Merge branch 'fix/FirstAdd' into 'develop'
fix: first add in daily, weekly or monthly See merge request rrll/p61-project!3
This commit is contained in:
commit
a5de568bf4
@ -1,6 +1,6 @@
|
|||||||
import { useRouter } from "expo-router"
|
import { useRouter } from "expo-router"
|
||||||
import { useMemo, useState } from "react"
|
import { useState } from "react"
|
||||||
import { View, ScrollView, Dimensions } from "react-native"
|
import { Dimensions, ScrollView, View } from "react-native"
|
||||||
import { Button, List, Text } from "react-native-paper"
|
import { Button, List, Text } from "react-native-paper"
|
||||||
|
|
||||||
import type { GoalFrequency } from "@/domain/entities/Goal"
|
import type { GoalFrequency } from "@/domain/entities/Goal"
|
||||||
@ -18,11 +18,9 @@ export const HabitsMainPage: React.FC<HabitsMainPageProps> = (props) => {
|
|||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const habitsByFrequency = useMemo(() => {
|
const habitsByFrequency = GOAL_FREQUENCIES.filter((frequency) => {
|
||||||
return GOAL_FREQUENCIES.filter((frequency) => {
|
|
||||||
return habitsTracker.habitsHistory[frequency].length > 0
|
return habitsTracker.habitsHistory[frequency].length > 0
|
||||||
})
|
})
|
||||||
}, [habitsTracker])
|
|
||||||
|
|
||||||
const [accordionExpanded, setAccordionExpanded] = useState<{
|
const [accordionExpanded, setAccordionExpanded] = useState<{
|
||||||
[key in GoalFrequency]: boolean
|
[key in GoalFrequency]: boolean
|
||||||
|
Loading…
Reference in New Issue
Block a user