Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
78d40884
Commit
78d40884
authored
Oct 29, 2021
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/redux/ecosystem/reducer.tsx
View file @
78d40884
...
...
@@ -9,8 +9,7 @@ const ecosystemReducer = (
):
ICategory
[]
=>
{
switch
(
action
.
type
)
{
case
"
CATEGORIES
"
:
{
const
payload
=
action
.
payload
as
{
categories
:
ICategory
[]
};
return
{
...
state
,
cateories
:
payload
.
categories
}
as
ICategory
[];
return
action
.
payload
as
ICategory
[];
}
default
:
return
state
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment