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

Function ForYouTabLabel

packages/shared/src/components/feeds/ForYouSort.tsx:80–110  ·  view source on GitHub ↗
({
  label,
  selected,
  hasChevron = false,
  isExplaining = false,
}: {
  label: string;
  selected: number;
  hasChevron?: boolean;
  isExplaining?: boolean;
})

Source from the content-addressed store, hash-verified

78 * Debug while it explains its cards (phones, where the switch is in the sheet).
79 */
80export const ForYouTabLabel = ({
81 label,
82 selected,
83 hasChevron = false,
84 isExplaining = false,
85}: {
86 label: string;
87 selected: number;
88 hasChevron?: boolean;
89 isExplaining?: boolean;
90}): ReactElement => (
91 <>
92 <span>
93 {label}
94 {selected !== DEFAULT_ALGORITHM_INDEX && (
95 <span className="ml-1 font-normal text-text-tertiary">
96 · {algorithms[selected].text}
97 </span>
98 )}
99 {isExplaining && (
100 <span className="ml-1 font-normal text-text-tertiary">· Debug</span>
101 )}
102 </span>
103 {hasChevron && (
104 <ArrowIcon
105 size={IconSize.Size16}
106 className={classNames('ml-0.5', forYouChevronClassName)}
107 />
108 )}
109 </>
110);
111
112/**
113 * The active For you tab is its own sort: a press opens Recommended or By

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected