[Glitch] Wait until relationship is loaded before showing follow button
Port cd049454be9cb8bf5fb6bc5316539432316033aa to glitch-soc
This commit is contained in:
		
							parent
							
								
									8852fff3a4
								
							
						
					
					
						commit
						3106c81b1e
					
				@ -56,7 +56,9 @@ export default class Header extends ImmutablePureComponent {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (me !== account.get('id')) {
 | 
					    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 = (
 | 
					        actionBtn = (
 | 
				
			||||||
          <div className='account--action-button'>
 | 
					          <div className='account--action-button'>
 | 
				
			||||||
            <IconButton size={26} active icon='hourglass' title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />
 | 
					            <IconButton size={26} active icon='hourglass' title={intl.formatMessage(messages.requested)} onClick={this.props.onFollow} />
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user