Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 8d5e4de

Browse files
link removed from error bountry
1 parent 0963f45 commit 8d5e4de

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

src/components/common/ErrorBoundary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
import { Link } from 'react-router-dom';
2+
// import { Link } from 'react-router-dom';
33

44
export default class ErrorBoundary extends Component {
55
constructor(props) {
@@ -26,7 +26,7 @@ export default class ErrorBoundary extends Component {
2626
<h1 className="center p-20 warn gr-bc">
2727
Sorry something went wrong.
2828
</h1>
29-
<Link to="/logout">Logout</Link>
29+
{/* <Link to="/logout">Logout</Link> */}
3030
</div>
3131
);
3232
}

src/forms/todo/drawer.form.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,22 @@ import { editTodo } from '../../store/actions/api.actions';
77

88
export default function DrawerForm() {
99
const [visible, setVisible] = useState(false);
10-
const [formData, setFormData] = useState({});
1110
const dispatch = useDispatch();
1211
const { editTodoData } = useSelector((state) => state.api);
1312

1413
useEffect(() => {
1514
if (!isEmpty(editTodoData)) {
1615
setVisible(true);
17-
setFormData(editTodoData);
1816
}
1917
}, [editTodoData]);
2018

2119
const showForm = () => {
2220
dispatch(editTodo());
2321
setVisible(true);
24-
setFormData({});
2522
};
2623

2724
const onClose = () => {
25+
dispatch(editTodo());
2826
setVisible(false);
2927
};
3028

@@ -41,11 +39,7 @@ export default function DrawerForm() {
4139
onClose={onClose}
4240
visible={visible}
4341
>
44-
<TodoForm
45-
onClose={onClose}
46-
editMode={!isEmpty(formData)}
47-
editableTodoData={formData}
48-
/>
42+
<TodoForm onClose={onClose} />
4943
</Drawer>
5044
</div>
5145
);

0 commit comments

Comments
 (0)