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

Function closeWith

packages/shared/src/hooks/usePrompt.ts:61–64  ·  view source on GitHub ↗
(result: boolean)

Source from the content-addressed store, hash-verified

59 (promptOptions: PromptOptions): Promise<boolean> =>
60 new Promise((resolve) => {
61 const closeWith = (result: boolean) => {
62 resolve(result);
63 setPrompt(null);
64 };
65 const newPrompt: Prompt = {
66 options: promptOptions,
67 onFail: () => closeWith(false),

Callers 1

usePromptFunction · 0.85

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected