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

Function useFeedWidgetTips

packages/shared/src/features/feedWidgets/tips.ts:271–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269 * known on the client, so the server and the hydration render list every tip.
270 */
271export const useFeedWidgetTips = (): FeedWidgetTip[] => {
272 const { isAndroidApp } = useAuthContext();
273 const isHydrated = useIsHydrated();
274 const canAddExtension =
275 !isHydrated ||
276 (!isAndroidApp && !isIOSNative() && isExtensionCapableBrowser());
277 const isEdge = isHydrated && getCurrentBrowserName() === BrowserName.Edge;
278
279 return useMemo(
280 () => getFeedWidgetTips({ canAddExtension, isEdge }),
281 [canAddExtension, isEdge],
282 );
283};
284
285/** One of the tips for a draw in [0, 1), for a page view. */
286export const pickFeedWidgetTip = (

Callers 3

FeedWidgetRailFunction · 0.90
renderTipsFunction · 0.90
TipGroupsFunction · 0.90

Calls 6

useAuthContextFunction · 0.90
useIsHydratedFunction · 0.90
isIOSNativeFunction · 0.90
getCurrentBrowserNameFunction · 0.90
getFeedWidgetTipsFunction · 0.85

Tested by 1

renderTipsFunction · 0.72