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

Function ShowTipsInFeed

packages/webapp/pages/tips.tsx:210–219  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208
209/** Offered to a signed-in reader whose rail has the tips off (the default). */
210const ShowTipsInFeed = (): ReactElement | null => {
211 const { user } = useAuthContext();
212 const { flags } = useSettingsContext();
213 const isHidden = isFeedWidgetTipHidden(
214 readStoredFeedRail(flags?.feedWidgets),
215 );
216
217 // The rail's hook only mounts for the readers who can use it.
218 return user && isHidden ? <RestoreTips /> : null;
219};
220
221function TipsPage(): ReactElement {
222 const isLaptopLayout = useLaptopLayout();

Callers

nothing calls this directly

Calls 4

useAuthContextFunction · 0.90
useSettingsContextFunction · 0.90
isFeedWidgetTipHiddenFunction · 0.90
readStoredFeedRailFunction · 0.90

Tested by

no test coverage detected