MCPcopy Create free account
hub / github.com/dailydotdev/apps / Feed

Function Feed

packages/shared/src/components/Feed.tsx:208–988  ·  view source on GitHub ↗
({
  feedName,
  feedQueryKey,
  query,
  variables,
  className,
  header,
  inlineHeader,
  onEmptyFeed,
  emptyScreen,
  options,
  allowPin,
  showSearch = true,
  shortcuts,
  actionButtons,
  disableAds,
  disableHighlightCards,
  disableTopHero,
  keepTopHero = false,
  skipFirstAd,
  deferWideCards,
  excludedPostIds,
  feedWidgets,
  staticAd,
  disableAdRefresh = false,
  allowFetchMore,
  pageSize,
  isHorizontal = false,
  feedContainerRef,
  disableListFrame = false,
  excludePinnedPosts = false,
  topContent: topContentProp,
  searchId,
  searchVersion,
  isExplaining = false,
  canExplainPosts = false,
}: FeedProps<T>)

Source from the content-addressed store, hash-verified

206);
207
208export default function Feed<T>({
209 feedName,
210 feedQueryKey,
211 query,
212 variables,
213 className,
214 header,
215 inlineHeader,
216 onEmptyFeed,
217 emptyScreen,
218 options,
219 allowPin,
220 showSearch = true,
221 shortcuts,
222 actionButtons,
223 disableAds,
224 disableHighlightCards,
225 disableTopHero,
226 keepTopHero = false,
227 skipFirstAd,
228 deferWideCards,
229 excludedPostIds,
230 feedWidgets,
231 staticAd,
232 disableAdRefresh = false,
233 allowFetchMore,
234 pageSize,
235 isHorizontal = false,
236 feedContainerRef,
237 disableListFrame = false,
238 excludePinnedPosts = false,
239 topContent: topContentProp,
240 searchId,
241 searchVersion,
242 isExplaining = false,
243 canExplainPosts = false,
244}: FeedProps<T>): ReactElement {
245 const origin = Origin.Feed;
246 const { logEvent } = useLogContext();
247 const currentSettings = useContext(FeedContext);
248 const { user } = useContext(AuthContext);
249 const { isFallback, query: routerQuery } = useRouter();
250 const { openNewTab, loadedSettings } = useContext(SettingsContext);
251 const { isListMode, shouldUseListFeedLayout } = useFeedLayout();
252 const numCards = currentSettings.numCards.eco;
253 const isSquadFeed = feedName === OtherFeedPage.Squads;
254 const trackedFeedFinish = useRef(false);
255 const isMyFeed = feedName === SharedFeedPage.MyFeed;
256 const showAcquisitionForm =
257 isMyFeed &&
258 (routerQuery?.[acquisitionKey] as string)?.toLocaleLowerCase() === 'true' &&
259 !user?.acquisitionChannel;
260 const { getMarketingCta } = useBoot();
261 const { isActionsFetched, checkHasCompleted } = useActions();
262 const marketingCta =
263 getMarketingCta(MarketingCtaVariant.Card) ||
264 getMarketingCta(MarketingCtaVariant.YearInReview) ||
265 getMarketingCta(MarketingCtaVariant.Video);

Callers

nothing calls this directly

Calls 15

useLogContextFunction · 0.90
useFeedLayoutFunction · 0.90
useBootFunction · 0.90
useActionsFunction · 0.90
useSearchResultsLayoutFunction · 0.90
useProfileCompletionCardFunction · 0.90
useConditionalFeatureFunction · 0.90
useHasIntroQuestsFunction · 0.90
useQuestDashboardFunction · 0.90
useUpdateQueryFunction · 0.90
getProductsQueryOptionsFunction · 0.90
useLaptopLayoutFunction · 0.90

Tested by

no test coverage detected