mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
- 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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user