mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 16:34:54 +00:00
- Fixed an issue with opening the add and edit dialog in the todos page
This commit is contained in:
@ -17,7 +17,7 @@ import AddChoreDialog from "@/components/pages/todos/AddChoreDialog";
|
||||
|
||||
const ToDoItem = (props: { item: IToDo; isSettings?: boolean }) => {
|
||||
const { updateToDo } = useToDosContext();
|
||||
const [editing, setEditing] = useState<boolean>(false);
|
||||
const [visible, setVisible] = useState<boolean>(false);
|
||||
const [points, setPoints] = useState(props.item.points);
|
||||
const [pointsModalVisible, setPointsModalVisible] = useState<boolean>(false);
|
||||
|
||||
@ -42,7 +42,7 @@ const ToDoItem = (props: { item: IToDo; isSettings?: boolean }) => {
|
||||
opacity: props.item.done ? 0.3 : 1,
|
||||
}}
|
||||
>
|
||||
<AddChoreDialog isVisible={editing} setIsVisible={setEditing} selectedTodo={props.item}/>
|
||||
{visible && <AddChoreDialog isVisible={visible} setIsVisible={setVisible} selectedTodo={props.item}/>}
|
||||
<View paddingB-8 row spread>
|
||||
<Text
|
||||
text70
|
||||
@ -52,7 +52,7 @@ const ToDoItem = (props: { item: IToDo; isSettings?: boolean }) => {
|
||||
fontSize: 15,
|
||||
}}
|
||||
onPress={() => {
|
||||
setEditing(true);
|
||||
setVisible(true);
|
||||
}}
|
||||
>
|
||||
{props.item.title}
|
||||
|
||||
Reference in New Issue
Block a user