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

Function getToolViewerCanClaim

packages/shared/src/graphql/tools.ts:176–181  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

174// Viewer-scoped, so it must never be baked into the anonymous SSG payload;
175// callers fetch this client-side only, gated to logged-in users.
176export const getToolViewerCanClaim = async (slug: string): Promise<boolean> => {
177 const result = await gqlClient.request<{
178 datasetTool: { viewerCanClaim: boolean };
179 }>(TOOL_VIEWER_CAN_CLAIM_QUERY, { slug });
180 return result.datasetTool.viewerCanClaim;
181};
182
183export interface ToolClaimResult {
184 claimedBy: ToolClaimedBy | null;

Callers 1

ToolPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected