- Fixed an issue with the Tod dialog

- Implementation of update todo and adding new days in the rule for a repeatable todo
This commit is contained in:
Dejan
2024-10-25 14:04:13 +02:00
parent 04f9e31ce4
commit f35033f5e7
6 changed files with 115 additions and 20 deletions

View File

@ -26,11 +26,14 @@ export default RepeatFreq;
const RepeatOption = ({ value, handleRepeatDaysChange, repeatDays }: { value: string, handleRepeatDaysChange: Function, repeatDays: string[] }) => {
const [isSet, setisSet] = useState(repeatDays.includes(value));
useEffect(() => {
handleRepeatDaysChange(value, isSet);
}, [isSet])
const handleDayChange = () => {
handleRepeatDaysChange(value, !isSet)
setisSet(!isSet);
}
return (
<TouchableOpacity onPress={() => setisSet(!isSet)}>
<TouchableOpacity onPress={handleDayChange}>
<View
center
marginT-8