Blanking Prompt value on close

This commit is contained in:
Phil 2022-01-30 14:21:46 +00:00
parent 08d0b4cbae
commit af43e63415

@ -26,9 +26,12 @@ export function PromptManager(): React.ReactElement {
[], [],
); );
const valueState = useState('')
function close(): void { function close(): void {
if (prompt === null) return; if (prompt === null) return;
prompt.resolve(false); prompt.resolve(false);
valueState[1]('')
setPrompt(null); setPrompt(null);
} }
@ -49,8 +52,6 @@ export function PromptManager(): React.ReactElement {
} }
} }
const valueState = useState('')
return ( return (
<> <>
{prompt != null && ( {prompt != null && (