src/reducers/reducer-jarvig.js
Avoid too many return
statements within this function. Open
Open
return {
...state,
game: {
...state.game,
result: [...state.game.result, action.payload ? "1" : "0"], // set 1 if correct, 0 if not
Avoid too many return
statements within this function. Open
Open
return {
...state,
game: {
...state.game,
choices: null,
Avoid too many return
statements within this function. Open
Open
return {
...state,
game: {
...state.game,
over: true
Avoid too many return
statements within this function. Open
Open
return {
...state,
game: {
...state.game,
time: action.payload
Avoid too many return
statements within this function. Open
Open
return {
...state,
fetching: false,
error: null,
characters: action.payload,
Avoid too many return
statements within this function. Open
Open
return {
...state
};
Avoid too many return
statements within this function. Open
Open
return { ...state, fetching: true, error: null };
Avoid too many return
statements within this function. Open
Open
return {
...state,
game: {
...state.game,
result: [...state.game.result, "0"], // set 0 as "wrong answer" because passed
Avoid too many return
statements within this function. Open
Open
return {
...state,
game: {
...state.game,
selected: action.payload
Avoid too many return
statements within this function. Open
Open
return { ...state, fetching: false, error: action.payload };