Create Account and Log In tabs (GH-1329, GH-1330) #180
Conversation
Contributor
zarembsky
commented
Aug 31, 2018
|
|
@zarembsky I added a commit with:
Please update:
Thanks |
|
Approved. |
| @@ -34,6 +34,7 @@ class HomeViewContainer extends React.Component { | |||
| window.document.title = title; | |||
|
|
|||
| this.props.actions.getHomeProps(); | |||
| props.actions.getUser(); | |||
jsignanini
Sep 11, 2018
Member
let's use this.props here for consistency.
let's use this.props here for consistency.
| setToast, | ||
| register: AccountActions.register, | ||
| getUser: AccountActions.getUser, | ||
| updateAccountPromotions: AccountActions.updateAccountPromotions, |
jsignanini
Sep 11, 2018
Member
let's write this as Object.assign({}, AccountActions, { setToast }), if we want all AccountActions functions. Otherwise, let's only import the required actions instead of all the AccountActions.
let's write this as Object.assign({}, AccountActions, { setToast }), if we want all AccountActions functions. Otherwise, let's only import the required actions instead of all the AccountActions.
app/hub/Views/HomeView/index.js
Outdated
| @@ -33,7 +34,9 @@ const mapStateToProps = state => Object.assign({}, state.home); | |||
| * @memberof SetupContainers | |||
| */ | |||
| const mapDispatchToProps = dispatch => ({ | |||
| actions: bindActionCreators(Object.assign(HomeViewActions), dispatch), | |||
| actions: bindActionCreators(Object.assign({}, HomeViewActions, { | |||
| getUser: AccountActions.getUser, | |||
jsignanini
Sep 11, 2018
Member
let's only import the function we need here, and not all the AccountActions.
let's only import the function we need here, and not all the AccountActions.
app/hub/Views/LogInView/index.js
Outdated
| login: AccountActions.login, | ||
| getUser: AccountActions.getUser, | ||
| getUserSettings: AccountActions.getUserSettings, | ||
| }), dispatch), |
jsignanini
Sep 11, 2018
Member
same as above here
same as above here
| actions: bindActionCreators(Object.assign({}, { | ||
| setToast, | ||
| getUser: AccountActions.getUser, | ||
| logout: AccountActions.logout, |
jsignanini
Sep 11, 2018
Member
same here, let's only import the functions we are using.
same here, let's only import the functions we are using.
app/hub/Views/SupporterView/index.js
Outdated
| @@ -32,7 +32,9 @@ const mapStateToProps = state => Object.assign({}, state.account); | |||
| * @memberof TutorialContainers | |||
| */ | |||
| const mapDispatchToProps = dispatch => ({ | |||
| actions: bindActionCreators(Object.assign({}, AccountActions), dispatch), | |||
| actions: bindActionCreators(Object.assign({}, { | |||
| getUser: AccountActions.getUser, | |||
jsignanini
Sep 11, 2018
Member
same here, we can just import getUser
same here, we can just import getUser
jsignanini
added a commit
that referenced
this pull request
Nov 20, 2018
jsignanini
added a commit
that referenced
this pull request
Nov 20, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.