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

Function useIsPhone

packages/shared/src/hooks/useViewSize.ts:62–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60// client render must agree: both say "not a phone" and the answer lands
61// after mount. The extension's new tab has no shell at any width.
62export const useIsPhone = (): boolean => {
63 const check = useMediaClient(
64 [viewSizeToQuery[ViewSize.MobileL].replace('@media ', '')],
65 [true],
66 false,
67 );
68
69 return !isExtension && check !== undefined && !check;
70};
71
72// Whether useIsPhone's answer has landed (after mount).
73export const useIsPhoneSettled = (): boolean => {

Callers 15

BookmarkFeedLayoutFunction · 0.90
FeedFunction · 0.90
MainFeedLayoutFunction · 0.90
OpportunityHeaderFunction · 0.90
ReadingStreakButtonFunction · 0.90
SmartComposerModalFunction · 0.90
ShellFieldFunction · 0.90
useQueryTabFunction · 0.90
NavDrawerFunction · 0.90
HeaderFunction · 0.90
ProfileHeaderFunction · 0.90
ProfileActionsFunction · 0.90

Calls 2

useMediaClientFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected