Fakultas Ilmu Komputer UI

Commit 78d40884 authored by Abraham Rudolf Brahmana's avatar Abraham Rudolf Brahmana
Browse files

fix: Reducer return to store the categoreis in global state

parent fbce1380
Pipeline #87082 passed with stage
in 8 minutes and 17 seconds
...@@ -9,8 +9,7 @@ const ecosystemReducer = ( ...@@ -9,8 +9,7 @@ const ecosystemReducer = (
): ICategory[] => { ): ICategory[] => {
switch (action.type) { switch (action.type) {
case "CATEGORIES": { case "CATEGORIES": {
const payload = action.payload as { categories: ICategory[] }; return action.payload as ICategory[];
return { ...state, cateories: payload.categories } as ICategory[];
} }
default: default:
return state; return state;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment