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

Commit 7c36bb8

Browse files
modal form rewrite process started
1 parent 27646b1 commit 7c36bb8

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

src/components/common/ErrorBoundary.js

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

34
export default class ErrorBoundary extends Component {
45
constructor(props) {
@@ -20,7 +21,14 @@ export default class ErrorBoundary extends Component {
2021
render() {
2122
if (this.state.hasError) {
2223
// You can render any custom fallback UI
23-
return <h1>Something went wrong.</h1>;
24+
return (
25+
<div className="center">
26+
<h1 className="center p-20 warn gr-bc">
27+
Sorry something went wrong.
28+
</h1>
29+
<Link to="/logout">Logout</Link>
30+
</div>
31+
);
2432
}
2533

2634
return this.props.children;

src/forms/todo/todo.form.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ function TodoForm({ onClose, editMode = false, editableTodoData = {} }) {
182182
}
183183

184184
TodoForm.propTypes = {
185-
editMode: PropTypes.bool.isRequired,
186185
onClose: PropTypes.func.isRequired,
187-
editableTodoData: PropTypes.object.isRequired,
186+
// editMode: PropTypes.bool.isRequired,
187+
// editableTodoData: PropTypes.object.isRequired,
188188
};
189189

190190
export { TodoForm };

src/store/reducers/api.reducer.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const initialState = {
22
showLoader: false,
33
status: null,
4-
notification: null,
54
todoListUpdated: '',
65
editTodoData: {},
76
};
@@ -18,8 +17,6 @@ export function api(state = initialState, action) {
1817
return { ...state, showLoader: true };
1918
case 'HIDE_LOADER':
2019
return { ...state, showLoader: false };
21-
case 'NOTIFICATION_REF':
22-
return { ...state, notification: action.reference };
2320
case 'UPDATE_TODO_LIST':
2421
return { ...state, todoListUpdated: action.payload };
2522
case 'EDIT_TODO':

src/store/reducers/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const rootReducer = (state, action) => {
1616
api: {
1717
showLoader: false,
1818
status: null,
19-
notification: state.api.notification,
2019
},
2120
history: {
2221
recent: '/login',

0 commit comments

Comments
 (0)