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

This commit is contained in:
Mason Hu committed 2024-11-13 14:36:34 +02:00
1 parent 9bbe7564a9
commit 6b9519b56f
1 file changed
+2 -1
+2 -1
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);
}