-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move props out of redux selected that dont belong there
- Loading branch information
1 parent
f1c3b9b
commit 8d9c6ec
Showing
15 changed files
with
97 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { SET_ISLOADING } from '../reducers/isLoading' | ||
|
||
export const acSetIsLoading = value => ({ | ||
type: SET_ISLOADING, | ||
value, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { apiGetShowDescription } from '../api/description' | ||
|
||
import { SET_SHOWDESCRIPTION } from '../reducers/showDescription' | ||
|
||
export const acSetShowDescription = value => ({ | ||
type: SET_SHOWDESCRIPTION, | ||
value, | ||
}) | ||
|
||
export const tSetShowDescription = () => async dispatch => { | ||
const onSuccess = value => { | ||
dispatch(acSetShowDescription(value)) | ||
} | ||
|
||
try { | ||
const showDescription = await apiGetShowDescription() | ||
return onSuccess(showDescription) | ||
} catch (err) { | ||
console.error('Error (apiGetShowDescription): ', err) | ||
return err | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { validateReducer } from '../modules/util' | ||
|
||
export const SET_ISLOADING = 'SET_ISLOADING' | ||
|
||
export const DEFAULT_STATE_SELECTED_ISLOADING = false | ||
|
||
const isLoading = (state = DEFAULT_STATE_SELECTED_ISLOADING, action) => { | ||
switch (action.type) { | ||
case SET_ISLOADING: | ||
return validateReducer( | ||
action.value, | ||
DEFAULT_STATE_SELECTED_ISLOADING | ||
) | ||
default: | ||
return state | ||
} | ||
} | ||
|
||
export default isLoading | ||
|
||
export const sGetIsLoading = state => state.isLoading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.