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

Function useViewSizeClient

packages/shared/src/hooks/useViewSize.ts:104–114  ·  view source on GitHub ↗
(size: ViewSize)

Source from the content-addressed store, hash-verified

102};
103
104export const useViewSizeClient = (size: ViewSize): boolean => {
105 const check = useMediaClient(
106 [viewSizeToQuery[size].replace('@media ', '')],
107 [true],
108 false,
109 );
110
111 return useMemo(() => {
112 return reversedEvaluatedSizes.includes(size) ? !check : check;
113 }, [check, size]);
114};
115
116export { useViewSize };

Callers 15

BookmarkFeedLayoutFunction · 0.90
ProfileMobileBackButtonFunction · 0.90
SquadDirectoryLayoutFunction · 0.90
SpotlightTriggerFunction · 0.90
FeedSettingsEditHeaderFunction · 0.90
useFeedSettingsEditFunction · 0.90
PostHeaderActionsFunction · 0.90
SquadDiscoverFrameFunction · 0.90
SquadDiscoverListPageFunction · 0.90
useSponsorStripFunction · 0.90
CoresLayoutFunction · 0.90

Calls 2

useMediaClientFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected