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

Function Feed

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

Source from the content-addressed store, hash-verified

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

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
useLayoutVariantFunction · 0.90

Tested by

no test coverage detected