| 305 | const isPhone = useIsPhone(); |
| 306 | |
| 307 | const getFirstSlotCard = (): ReactElement | null => { |
| 308 | const canShowGrowthCta = |
| 309 | !disableAds && |
| 310 | !isHorizontal && |
| 311 | feedQueryKey?.[0] !== RequestKey.FeedPreview; |
| 312 | const canShowNonPlusCta = canShowGrowthCta && !user?.isPlus; |
| 313 | |
| 314 | if (canShowNonPlusCta && plusEntryFeed) { |
| 315 | return <PlusGrid {...plusEntryFeed} />; |
| 316 | } |
| 317 | if (canShowGrowthCta && marketingCta) { |
| 318 | if (marketingCta.variant === MarketingCtaVariant.YearInReview) { |
| 319 | return <MarketingCtaYearInReview marketingCta={marketingCta} />; |
| 320 | } |
| 321 | if (marketingCta.variant === MarketingCtaVariant.Video) { |
| 322 | return <MarketingCtaVideo marketingCta={marketingCta} />; |
| 323 | } |
| 324 | const Component = shouldUseListFeedLayout |
| 325 | ? MarketingCtaList |
| 326 | : MarketingCtaCard; |
| 327 | return <Component marketingCta={marketingCta} />; |
| 328 | } |
| 329 | if (canShowNonPlusCta && showAcquisitionForm) { |
| 330 | const Component = shouldUseListFeedLayout |
| 331 | ? AcquisitionFormList |
| 332 | : AcquisitionFormGrid; |
| 333 | return <Component />; |
| 334 | } |
| 335 | if (showProfileCompletionCard) { |
| 336 | return <ProfileCompletionCard className={{ container: 'p-4 pt-0' }} />; |
| 337 | } |
| 338 | if (showBriefCard) { |
| 339 | return ( |
| 340 | <BriefCardFeed |
| 341 | targetId={TargetId.Feed} |
| 342 | className={{ container: 'p-4 pt-0' }} |
| 343 | /> |
| 344 | ); |
| 345 | } |
| 346 | return null; |
| 347 | }; |
| 348 | |
| 349 | const eligibleFirstSlotCard = getFirstSlotCard(); |
| 350 | const { |