| 267 | const isPhone = useIsPhone(); |
| 268 | |
| 269 | const getFirstSlotCard = (): ReactElement | null => { |
| 270 | const canShowGrowthCta = |
| 271 | !disableAds && |
| 272 | !isHorizontal && |
| 273 | feedQueryKey?.[0] !== RequestKey.FeedPreview; |
| 274 | const canShowNonPlusCta = canShowGrowthCta && !user?.isPlus; |
| 275 | |
| 276 | if (canShowNonPlusCta && plusEntryFeed) { |
| 277 | return <PlusGrid {...plusEntryFeed} />; |
| 278 | } |
| 279 | if (canShowGrowthCta && marketingCta) { |
| 280 | if (marketingCta.variant === MarketingCtaVariant.YearInReview) { |
| 281 | return <MarketingCtaYearInReview marketingCta={marketingCta} />; |
| 282 | } |
| 283 | if (marketingCta.variant === MarketingCtaVariant.Video) { |
| 284 | return <MarketingCtaVideo marketingCta={marketingCta} />; |
| 285 | } |
| 286 | const Component = shouldUseListFeedLayout |
| 287 | ? MarketingCtaList |
| 288 | : MarketingCtaCard; |
| 289 | return <Component marketingCta={marketingCta} />; |
| 290 | } |
| 291 | if (canShowNonPlusCta && showAcquisitionForm) { |
| 292 | const Component = shouldUseListFeedLayout |
| 293 | ? AcquisitionFormList |
| 294 | : AcquisitionFormGrid; |
| 295 | return <Component />; |
| 296 | } |
| 297 | if (showProfileCompletionCard) { |
| 298 | return <ProfileCompletionCard className={{ container: 'p-4 pt-0' }} />; |
| 299 | } |
| 300 | if (showBriefCard) { |
| 301 | return ( |
| 302 | <BriefCardFeed |
| 303 | targetId={TargetId.Feed} |
| 304 | className={{ container: 'p-4 pt-0' }} |
| 305 | /> |
| 306 | ); |
| 307 | } |
| 308 | return null; |
| 309 | }; |
| 310 | |
| 311 | const eligibleFirstSlotCard = getFirstSlotCard(); |
| 312 | const { |