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

Function useRequestProtocol

packages/shared/src/hooks/useRequestProtocol.ts:12–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10};
11
12export const useRequestProtocol = (): ResolvedRequestProtocol => {
13 const client = useQueryClient();
14 const { requestMethod, fetchMethod, isCompanion } =
15 client.getQueryData<RequestProtocol>(REQUEST_PROTOCOL_KEY) || {};
16
17 return useMemo(
18 () => ({
19 requestMethod: requestMethod || gqlRequest,
20 fetchMethod: fetchMethod || fetch,
21 isCompanion,
22 }),
23 [requestMethod, fetchMethod, isCompanion],
24 );
25};

Callers 15

GrowthBookProviderFunction · 0.90
MarkdownFunction · 0.90
ProfilePictureComponentFunction · 0.90
TooltipFunction · 0.90
RepostsModalFunction · 0.90
UpvotedPopupModalFunction · 0.90
SourceProfilePictureFunction · 0.90
RootPortalFunction · 0.90
MarkdownPreviewFunction · 0.90
useMentionAutocompleteFunction · 0.90
CommentActionButtonsFunction · 0.90
CommentActionButtonsV1Function · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected