Skip to content
This repository was archived by the owner on Jul 7, 2021. It is now read-only.

Commit e5a0eb2

Browse files
committed
create new condition for new post in postReducer
1 parent 97b66b8 commit e5a0eb2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/reducers/postReducer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export default function (state = initialState, action) {
1313
...state,
1414
items: action.payload,
1515
};
16+
case NEW_POST:
17+
return {
18+
...state,
19+
item: action.payload,
20+
};
1621
default:
1722
return state;
1823
}

0 commit comments

Comments
 (0)