Fix undefined block (#4471)
* Fix undefined block (#4378) * Fix undefined block * Changing text and handling all blocks. * Tweaks * Hide follow button in hover card if user blocked --------- Co-authored-by: Josh <hi@oracularhades.com>
This commit is contained in:
		
							parent
							
								
									212f5750e3
								
							
						
					
					
						commit
						7cac413f3b
					
				
					 2 changed files with 22 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -196,6 +196,12 @@ let FeedItemInner = ({
 | 
			
		|||
    },
 | 
			
		||||
  ]
 | 
			
		||||
 | 
			
		||||
  const isParentBlocked = Boolean(
 | 
			
		||||
    parentAuthor?.viewer?.blockedBy ||
 | 
			
		||||
      parentAuthor?.viewer?.blocking ||
 | 
			
		||||
      parentAuthor?.viewer?.blockingByList,
 | 
			
		||||
  )
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
    <Link
 | 
			
		||||
      testID={`feedItem-by-${post.author.handle}`}
 | 
			
		||||
| 
						 | 
				
			
			@ -320,7 +326,16 @@ let FeedItemInner = ({
 | 
			
		|||
            onOpenAuthor={onOpenAuthor}
 | 
			
		||||
          />
 | 
			
		||||
          {!isThreadChild && showReplyTo && parentAuthor && (
 | 
			
		||||
            <ReplyToLabel profile={parentAuthor} />
 | 
			
		||||
            <ReplyToLabel
 | 
			
		||||
              profile={
 | 
			
		||||
                isParentBlocked
 | 
			
		||||
                  ? {
 | 
			
		||||
                      ...parentAuthor,
 | 
			
		||||
                      displayName: _(msg`a blocked user`),
 | 
			
		||||
                    }
 | 
			
		||||
                  : parentAuthor
 | 
			
		||||
              }
 | 
			
		||||
            />
 | 
			
		||||
          )}
 | 
			
		||||
          <LabelsOnMyPost post={post} />
 | 
			
		||||
          <PostContent
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue