From 6b9519b56f64fd9df80422a98fce9cf5ac85f263 Mon Sep 17 00:00:00 2001 From: Mason Hu Date: Wed, 13 Nov 2024 14:36:34 +0200 Subject: [PATCH] fix: prevent previous prompt name and content from displaying when adding new prompt --- frontend/src/settings/Prompts.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/settings/Prompts.tsx b/frontend/src/settings/Prompts.tsx index 3d041555..9501b47d 100644 --- a/frontend/src/settings/Prompts.tsx +++ b/frontend/src/settings/Prompts.tsx @@ -58,7 +58,8 @@ export default function Prompts({ } setModalState('INACTIVE'); onSelectPrompt(newPromptName, newPrompt.id, newPromptContent); - setNewPromptName(newPromptName); + setNewPromptName(''); + setNewPromptContent(''); } catch (error) { console.error(error); }