| 269 | * known on the client, so the server and the hydration render list every tip. |
| 270 | */ |
| 271 | export 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. */ |
| 286 | export const pickFeedWidgetTip = ( |