Skip to content

Commit

Permalink
eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dracco1993 committed Jan 9, 2020
1 parent b7fc1d1 commit 3a26410
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
File renamed without changes.
14 changes: 6 additions & 8 deletions src/redux/dialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ const openDialog = dialog => ({
dialog
});

// Action helpers
export const updateDialog = (open, object) => dispatch => {
if (object == null) {
object = initialState.object;
}
dispatch(openDialog({ open, object }));
};

// Initial dialog state
const initialState = {
open: false,
Expand All @@ -23,6 +15,12 @@ const initialState = {
}
};

// Action helpers
export const updateDialog = (open, object) => dispatch => {
let dialog = object == null ? initialState.object : object;
dispatch(openDialog({ open, dialog }));
};

const dialogReducer = (state = initialState, action) => {
switch (action.type) {
case UPDATE_DIALOG_OPEN:
Expand Down
2 changes: 2 additions & 0 deletions src/redux/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ const userReducer = (state = initialState, action) => {
switch (action.type) {
case LOGIN_USER:
return { ...action.user };
case LOGOUT_USER:
return { ...initialState };
default:
return state;
}
Expand Down

0 comments on commit 3a26410

Please sign in to comment.