mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 17:16:11 -05:00
Use a prop for refreshSession
Since dispatch is not passed in anymore.
This commit is contained in:
parent
99c1f3f0b8
commit
2ac6ed4c73
1 changed files with 5 additions and 2 deletions
|
@ -129,7 +129,7 @@ class Splash extends React.Component {
|
|||
useCsrf: true,
|
||||
json: {cue: cue, value: false}
|
||||
}, err => {
|
||||
if (!err) this.props.dispatch(sessionActions.refreshSession());
|
||||
if (!err) this.props.refreshSession();
|
||||
});
|
||||
}
|
||||
shouldShowWelcome () {
|
||||
|
@ -178,7 +178,6 @@ class Splash extends React.Component {
|
|||
|
||||
Splash.propTypes = {
|
||||
activity: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
dispatch: PropTypes.func,
|
||||
featured: PropTypes.shape({
|
||||
community_featured_projects: PropTypes.array,
|
||||
community_featured_studios: PropTypes.array,
|
||||
|
@ -204,6 +203,7 @@ Splash.propTypes = {
|
|||
isAdmin: PropTypes.bool,
|
||||
isEducator: PropTypes.bool,
|
||||
loved: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
refreshSession: PropTypes.func.isRequired,
|
||||
sessionStatus: PropTypes.string,
|
||||
setRows: PropTypes.func.isRequired,
|
||||
shared: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
|
@ -257,6 +257,9 @@ const mapDispatchToProps = dispatch => ({
|
|||
getLovedByFollowing: (username, token) => {
|
||||
dispatch(splashActions.getLovedByFollowing(username, token));
|
||||
},
|
||||
refreshSession: () => {
|
||||
dispatch(sessionActions.refreshSession());
|
||||
},
|
||||
setRows: (type, rows) => {
|
||||
dispatch(splashActions.setRows(type, rows));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue