File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import moment from 'moment/min/moment-with-locales.min';
99import { LoadingUserListItem , UserListItem , ViewContainer } from 'components' ;
1010import { colors , fonts , normalize } from 'config' ;
1111import { emojifyText , translate } from 'utils' ;
12- import { getUserEvents } from 'auth' ;
12+ import { getUserEvents , getUser } from 'auth' ;
1313import { getNotificationsCount } from 'notifications' ;
1414
1515const mapStateToProps = state => ( {
@@ -25,6 +25,7 @@ const mapDispatchToProps = dispatch =>
2525 {
2626 getUserEvents,
2727 getNotificationsCount,
28+ getUser,
2829 } ,
2930 dispatch
3031 ) ;
@@ -78,8 +79,12 @@ const styles = StyleSheet.create({
7879
7980class Events extends Component {
8081 componentDidMount ( ) {
81- if ( this . props . user . login ) {
82+ const { user : { login } , getUser } = this . props ;
83+
84+ if ( login ) {
8285 this . getUserEvents ( ) ;
86+ } else {
87+ getUser ( ) ;
8388 }
8489 }
8590
You can’t perform that action at this time.
0 commit comments