Skip to content

Commit

Permalink
clean up canEdit logic
Browse files Browse the repository at this point in the history
  • Loading branch information
dkent600 committed Aug 12, 2020
1 parent 47e0c4b commit 8041240
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/Account/AccountProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ class AccountProfilePage extends React.Component<IProps, IState> {
}

// TODO: dont show profile until loaded from 3box and we are fully in sync with the actual current account
const canEdit = !currentAccountAddress || (accountAddress === currentAccountAddress);
const editing = currentAccountAddress && (accountAddress === currentAccountAddress) && this.props.isConnected;
const canEdit = currentAccountAddress && (accountAddress === currentAccountAddress);
const editing = canEdit && this.props.isConnected;

const profileContainerClass = classNames({
[css.profileContainer]: true,
Expand Down Expand Up @@ -303,7 +303,7 @@ class AccountProfilePage extends React.Component<IProps, IState> {
<span>{accountAddress.substr(0, 20)}...</span>
<CopyToClipboard value={accountAddress} color={IconColor.Black}/>
</div>
{(canEdit && !editing && currentAccountAddress) ?
{(canEdit && !editing) ?
<div className={css.saveProfile}>
<button className={css.submitButton} type="button" onClick={this.handleConnect}>Edit</button>
</div>
Expand Down

0 comments on commit 8041240

Please sign in to comment.