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

Function getFeedListVariables

packages/shared/src/hooks/feed/useFeeds.ts:48–65  ·  view source on GitHub ↗
({
  feedChipsVariant,
  isOnboardingComplete,
  isTagChipFeedsSeeded,
}: FeedListVariablesProps)

Source from the content-addressed store, hash-verified

46};
47
48export const getFeedListVariables = ({
49 feedChipsVariant,
50 isOnboardingComplete,
51 isTagChipFeedsSeeded,
52}: FeedListVariablesProps): ShellStateVariables => {
53 const includeTagChipFeeds =
54 feedChipsVariant !== FeedChipsVariant.None &&
55 (isOnboardingComplete || !!isTagChipFeedsSeeded);
56 const tagChipSeedStrategy =
57 includeTagChipFeeds && feedChipsVariant === FeedChipsVariant.V3
58 ? TagChipSeedStrategy.V3
59 : undefined;
60
61 return {
62 includeTagChipFeeds,
63 ...(tagChipSeedStrategy && { tagChipSeedStrategy }),
64 };
65};
66
67export const useFeedListVariables = (): ShellStateVariables => {
68 const { user } = useAuthContext();

Callers 2

ShellStateRequestFunction · 0.90
useFeedListVariablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected