fix: prevent previous prompt name and content from displaying when adding new prompt

This commit is contained in:
Mason Hu
2024-11-13 14:36:34 +02:00
parent 9bbe7564a9
commit 6b9519b56f

View File

@@ -58,7 +58,8 @@ export default function Prompts({
}
setModalState('INACTIVE');
onSelectPrompt(newPromptName, newPrompt.id, newPromptContent);
setNewPromptName(newPromptName);
setNewPromptName('');
setNewPromptContent('');
} catch (error) {
console.error(error);
}