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

Function Feed

packages/shared/src/components/Feed.tsx:171–875  ·  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,
  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

169);
170
171export default function Feed<T>({
172 feedName,
173 feedQueryKey,
174 query,
175 variables,
176 className,
177 header,
178 inlineHeader,
179 onEmptyFeed,
180 emptyScreen,
181 options,
182 allowPin,
183 showSearch = true,
184 shortcuts,
185 actionButtons,
186 disableAds,
187 disableHighlightCards,
188 disableTopHero,
189 keepTopHero = false,
190 skipFirstAd,
191 deferWideCards,
192 excludedPostIds,
193 staticAd,
194 disableAdRefresh = false,
195 allowFetchMore,
196 pageSize,
197 isHorizontal = false,
198 feedContainerRef,
199 disableListFrame = false,
200 excludePinnedPosts = false,
201 topContent: topContentProp,
202 searchId,
203 searchVersion,
204 isExplaining = false,
205 canExplainPosts = false,
206}: FeedProps<T>): ReactElement {
207 const origin = Origin.Feed;
208 const { logEvent } = useLogContext();
209 const currentSettings = useContext(FeedContext);
210 const { user } = useContext(AuthContext);
211 const { isFallback, query: routerQuery } = useRouter();
212 const { openNewTab, loadedSettings } = useContext(SettingsContext);
213 const { isListMode, shouldUseListFeedLayout } = useFeedLayout();
214 const numCards = currentSettings.numCards.eco;
215 const isSquadFeed = feedName === OtherFeedPage.Squads;
216 const trackedFeedFinish = useRef(false);
217 const isMyFeed = feedName === SharedFeedPage.MyFeed;
218 const showAcquisitionForm =
219 isMyFeed &&
220 (routerQuery?.[acquisitionKey] as string)?.toLocaleLowerCase() === 'true' &&
221 !user?.acquisitionChannel;
222 const { getMarketingCta } = useBoot();
223 const { isActionsFetched, checkHasCompleted } = useActions();
224 const marketingCta =
225 getMarketingCta(MarketingCtaVariant.Card) ||
226 getMarketingCta(MarketingCtaVariant.YearInReview) ||
227 getMarketingCta(MarketingCtaVariant.Video);
228 const { plusEntryFeed } = usePlusEntry();

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