Adds signup CTA tests for logged-out visitors (#8906)
This commit is contained in:
@@ -40,12 +40,13 @@ import {
|
||||
OUTER_SPACE,
|
||||
REPLY_LINE_WIDTH,
|
||||
} from '#/screens/PostThread/const'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {atoms as a, useBreakpoints, useTheme} from '#/alf'
|
||||
import {colors} from '#/components/Admonition'
|
||||
import {Button} from '#/components/Button'
|
||||
import {CalendarClock_Stroke2_Corner0_Rounded as CalendarClockIcon} from '#/components/icons/CalendarClock'
|
||||
import {Trash_Stroke2_Corner0_Rounded as TrashIcon} from '#/components/icons/Trash'
|
||||
import {InlineLinkText, Link} from '#/components/Link'
|
||||
import {LoggedOutCTA} from '#/components/LoggedOutCTA'
|
||||
import {ContentHider} from '#/components/moderation/ContentHider'
|
||||
import {LabelsOnMyPost} from '#/components/moderation/LabelsOnMe'
|
||||
import {PostAlerts} from '#/components/moderation/PostAlerts'
|
||||
@@ -178,6 +179,7 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
||||
const {_, i18n} = useLingui()
|
||||
const {openComposer} = useOpenComposer()
|
||||
const {currentAccount, hasSession} = useSession()
|
||||
const {gtTablet} = useBreakpoints()
|
||||
const feedFeedback = useFeedFeedback(postSource?.feed, hasSession)
|
||||
|
||||
const post = postShadow
|
||||
@@ -311,6 +313,8 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
||||
},
|
||||
isRoot && [a.pt_lg],
|
||||
]}>
|
||||
{/* Show CTA for logged-out visitors - hide on desktop and check gate */}
|
||||
{!gtTablet && <LoggedOutCTA gateName="cta_above_post_heading" />}
|
||||
<View style={[a.flex_row, a.gap_md, a.pb_md]}>
|
||||
<View collapsable={false}>
|
||||
<PreviewableUserAvatar
|
||||
|
||||
@@ -38,6 +38,7 @@ import {
|
||||
import {atoms as a, native, platform, useBreakpoints, web} from '#/alf'
|
||||
import * as Layout from '#/components/Layout'
|
||||
import {ListFooter} from '#/components/Lists'
|
||||
import {LoggedOutCTA} from '#/components/LoggedOutCTA'
|
||||
|
||||
const PARENT_CHUNK_SIZE = 5
|
||||
const CHILDREN_CHUNK_SIZE = 50
|
||||
@@ -405,6 +406,8 @@ export function PostThread({uri}: {uri: string}) {
|
||||
onPostSuccess={optimisticOnPostReply}
|
||||
postSource={anchorPostSource}
|
||||
/>
|
||||
{/* Show CTA for logged-out visitors */}
|
||||
<LoggedOutCTA style={a.px_lg} gateName="cta_above_post_replies" />
|
||||
</View>
|
||||
)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user