Refactor GrowthHack to always render on iOS with enabled prop (#9723)
Drill down an `enabled` prop to ThreadItemAnchorFollowButtonInner so that the GrowthHack wrapper is always rendered on iOS, even when the follow button shouldn't be displayed. The inner component returns null when disabled, allowing GrowthHack to render its logo without children. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -381,11 +381,12 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
||||
</ProfileHoverCard>
|
||||
</View>
|
||||
</Link>
|
||||
{showFollowButton && (
|
||||
<View collapsable={false} style={[a.self_center]}>
|
||||
<ThreadItemAnchorFollowButton did={post.author.did} />
|
||||
</View>
|
||||
)}
|
||||
<View collapsable={false} style={[a.self_center]}>
|
||||
<ThreadItemAnchorFollowButton
|
||||
did={post.author.did}
|
||||
enabled={showFollowButton}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<View style={[a.pb_sm]}>
|
||||
<LabelsOnMyPost post={post} style={[a.pb_sm]} />
|
||||
|
||||
Reference in New Issue
Block a user