mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-24 08:55:14 +03:00
Merge pull request #224 from esteemapp/apple/request
added login button to notf
This commit is contained in:
commit
d76ea01ed4
@ -72,6 +72,12 @@ class NotificationContainer extends Component {
|
||||
});
|
||||
};
|
||||
|
||||
_handleOnPressLogin = () => {
|
||||
const { navigation } = this.props;
|
||||
|
||||
navigation.navigate(ROUTES.SCREENS.LOGIN);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { notifications } = this.state;
|
||||
|
||||
@ -81,6 +87,7 @@ class NotificationContainer extends Component {
|
||||
notifications={notifications}
|
||||
navigateToNotificationRoute={this._navigateToNotificationRoute}
|
||||
readAllNotification={this._readAllNotification}
|
||||
handleLoginPress={this._handleOnPressLogin}
|
||||
{...this.props}
|
||||
/>
|
||||
);
|
||||
@ -89,6 +96,7 @@ class NotificationContainer extends Component {
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
username: state.account.currentAccount.name,
|
||||
isLoggedIn: state.application.isLoggedIn,
|
||||
activeBottomTab: state.ui.activeBottomTab,
|
||||
});
|
||||
|
||||
|
@ -28,6 +28,8 @@ class NotificationScreen extends PureComponent {
|
||||
intl,
|
||||
navigateToNotificationRoute,
|
||||
readAllNotification,
|
||||
handleLoginPress,
|
||||
isLoggedIn,
|
||||
} = this.props;
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
@ -44,12 +46,22 @@ class NotificationScreen extends PureComponent {
|
||||
})}
|
||||
style={styles.notificationTab}
|
||||
>
|
||||
<Notification
|
||||
getActivities={getActivities}
|
||||
notifications={notifications}
|
||||
navigateToNotificationRoute={navigateToNotificationRoute}
|
||||
readAllNotification={readAllNotification}
|
||||
/>
|
||||
{isLoggedIn ? (
|
||||
<Notification
|
||||
getActivities={getActivities}
|
||||
notifications={notifications}
|
||||
navigateToNotificationRoute={navigateToNotificationRoute}
|
||||
readAllNotification={readAllNotification}
|
||||
/>
|
||||
) : (
|
||||
<NoPost
|
||||
isButtonText
|
||||
defaultText={intl.formatMessage({
|
||||
id: 'profile.login_to_see',
|
||||
})}
|
||||
handleOnButtonPress={handleLoginPress}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View
|
||||
tabLabel={intl.formatMessage({
|
||||
|
Loading…
Reference in New Issue
Block a user