fixed wrong using islogged in props

This commit is contained in:
u-e 2018-12-03 12:54:42 +03:00
parent 654683056b
commit 1de49028b5
5 changed files with 13 additions and 27 deletions

View File

@ -143,9 +143,7 @@ class SideMenuView extends Component {
? menuItems[menuItems.length - 1].id === item.id
? intl.formatMessage({ id: `side_menu.${item.id}` })
: item.name
:
intl.formatMessage({ id: `side_menu.${item.id}` })
}
: intl.formatMessage({ id: `side_menu.${item.id}` })}
</Text>
</ListItem>
)}

View File

@ -43,12 +43,6 @@ const authMenuItems = [
icon: 'gear',
id: 'settings',
},
{
name: 'Add Account',
route: ROUTES.SCREENS.LOGIN,
icon: 'plus-square-o',
id: 'add_account',
},
];
const noAuthMenuItems = [

View File

@ -27,17 +27,15 @@ class ProfileContainer extends Component {
constructor(props) {
super(props);
this.state = {
user: null,
comments: [],
replies: [],
follows: {},
isLoggedIn: false,
isLoading: false,
isReverseHeader: false,
isReady: false,
isFollowing: false,
isLoading: false,
isMuted: false,
isProfileLoading: false,
isReady: false,
isReverseHeader: false,
user: null,
};
}
@ -75,7 +73,6 @@ class ProfileContainer extends Component {
this.setState({
isReady: true,
comments: result,
refreshing: false,
isLoading: false,
});
})
@ -256,13 +253,12 @@ class ProfileContainer extends Component {
isFollowing,
isMuted,
isLoading,
isLoggedIn,
isReady,
isReverseHeader,
user,
username,
} = this.state;
const { isDarkTheme } = this.props;
const { isDarkTheme, isLoggedIn } = this.props;
return (
<Fragment>
@ -271,19 +267,19 @@ class ProfileContainer extends Component {
comments={comments}
error={error}
follows={follows}
handleOnFollowsPress={this._handleFollowsPress}
handleFollowUnfollowUser={this._handleFollowUnfollowUser}
handleMuteUnmuteUser={this._handleMuteUnmuteUser}
isProfileLoading={isProfileLoading}
handleOnFollowsPress={this._handleFollowsPress}
isDarkTheme={isDarkTheme}
isFollowing={isFollowing}
isLoading={isLoading}
isLoggedIn={isLoggedIn}
isReady={isReady}
isMuted={isMuted}
isProfileLoading={isProfileLoading}
isReady={isReady}
isReverseHeader={isReverseHeader}
user={user}
username={username}
isDarkTheme={isDarkTheme}
/>
</Fragment>
);

View File

@ -1,4 +1,3 @@
/* eslint-disable no-unused-vars */
import React, { Component, Fragment } from 'react';
import { View, ScrollView } from 'react-native';
import { injectIntl } from 'react-intl';
@ -17,7 +16,6 @@ import { Wallet } from '../../../components/wallet';
// Utilitites
import { getFormatedCreatedDate } from '../../../utils/time';
import { getRcPower, getVotingPower } from '../../../utils/manaBar';
import parseToken from '../../../utils/parseToken';
// Styles
import styles from './profileStyles';
@ -92,7 +90,6 @@ class ProfileScreen extends Component {
// locked={!isLoggedIn}
>
<ProfileSummary
intl={intl}
coverImage={coverImage}
date={getFormatedCreatedDate(user && user.created)}
followerCount={follows.follower_count}
@ -102,6 +99,7 @@ class ProfileScreen extends Component {
handleOnFollowsPress={handleOnFollowsPress}
hoursRC={fullInHourRC || null}
hoursVP={fullInHourVP || null}
intl={intl}
isDarkTheme={isDarkTheme}
isFollowing={isFollowing}
isLoggedIn={isLoggedIn}

View File

@ -5,7 +5,7 @@ export default EStyleSheet.create({
container: {
flex: 1,
top: StatusBar.currentHeight,
backgroundColor: '$primaryGrayBackground',
backgroundColor: '$primaryLightBackground',
},
content: {
backgroundColor: '$primaryGrayBackground',