[Glitch] Wait until relationship is loaded before showing follow button
Port 38f6a43960 to glitch-soc
			
			
This commit is contained in:
		
							parent
							
								
									bd43a06413
								
							
						
					
					
						commit
						2f8583ce4a
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -56,7 +56,9 @@ export default class Header extends ImmutablePureComponent {
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    if (me !== account.get('id')) {
 | 
			
		||||
      if (account.getIn(['relationship', 'requested'])) {
 | 
			
		||||
      if (!account.get('relationship')) { // Wait until the relationship is loaded
 | 
			
		||||
        actionBtn = '';
 | 
			
		||||
      } else if (account.getIn(['relationship', 'requested'])) {
 | 
			
		||||
        actionBtn = (
 | 
			
		||||
          <div className='account--action-button'>
 | 
			
		||||
            <IconButton size={26} active icon='hourglass' title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue