({
children,
topContent,
header,
footer,
className,
inlineHeader = false,
showSearch,
shortcuts,
actionButtons,
isHorizontal,
feedContainerRef,
hasFirstSlotCard,
disableListFrame = false,
}: FeedContainerProps)
| 129 | }; |
| 130 | |
| 131 | export const FeedContainer = ({ |
| 132 | children, |
| 133 | topContent, |
| 134 | header, |
| 135 | footer, |
| 136 | className, |
| 137 | inlineHeader = false, |
| 138 | showSearch, |
| 139 | shortcuts, |
| 140 | actionButtons, |
| 141 | isHorizontal, |
| 142 | feedContainerRef, |
| 143 | hasFirstSlotCard, |
| 144 | disableListFrame = false, |
| 145 | }: FeedContainerProps): ReactElement => { |
| 146 | const currentSettings = useContext(FeedContext); |
| 147 | const { subject } = useToastNotification(); |
| 148 | const { loadedSettings } = useContext(SettingsContext); |
| 149 | const { shouldUseListFeedLayout, isListMode } = useFeedLayout(); |
| 150 | const isLaptop = useViewSize(ViewSize.Laptop); |
| 151 | const isPhone = useIsPhone(); |
| 152 | const isLaptopLayout = useLaptopLayout(); |
| 153 | const { feedName } = useActiveFeedNameContext(); |
| 154 | const activeFeedName = feedName ?? SharedFeedPage.MyFeed; |
| 155 | const { isAnyExplore, isExplorePopular, isExploreLatest } = useFeedName({ |
| 156 | feedName: activeFeedName, |
| 157 | }); |
| 158 | const router = useRouter(); |
| 159 | const numCards = currentSettings.numCards.eco; |
| 160 | const isList = |
| 161 | (isHorizontal || isListMode) && !shouldUseListFeedLayout |
| 162 | ? false |
| 163 | : (isListMode && numCards > 1) || shouldUseListFeedLayout; |
| 164 | const feedGapClass = gapClass({ |
| 165 | isList, |
| 166 | isFeedLayoutList: shouldUseListFeedLayout, |
| 167 | }) as FeedGapClass; |
| 168 | const gapSizePx = feedGapPx[feedGapClass]; |
| 169 | const style = { |
| 170 | '--num-cards': isHorizontal && isListMode && numCards >= 2 ? 2 : numCards, |
| 171 | '--feed-gap': `${gapSizePx / 16}rem`, |
| 172 | } as CSSProperties; |
| 173 | const isFinder = router.pathname === '/search/posts'; |
| 174 | const isSearch = showSearch && !isFinder; |
| 175 | |
| 176 | const { getMarketingCta, clearMarketingCta } = useBoot(); |
| 177 | const marketingCta = getMarketingCta(MarketingCtaVariant.FeedBanner); |
| 178 | const { isJobsEnabled } = useJobsFeature(); |
| 179 | const { onUpload, status, shouldShow } = useUploadCv({ |
| 180 | modalContent: isJobsEnabled |
| 181 | ? uploadCvOpportunitySuccessContent |
| 182 | : uploadCvProfileSuccessContent, |
| 183 | onUploadSuccess: () => { |
| 184 | if (marketingCta) { |
| 185 | clearMarketingCta(marketingCta.campaignId); |
| 186 | } |
| 187 | }, |
| 188 | }); |
nothing calls this directly
no test coverage detected