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

Function closeWith

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

Source from the content-addressed store, hash-verified

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

Callers 1

usePromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected