From 15be8f8fdd51814571797aa7a26614d12f4a4be3 Mon Sep 17 00:00:00 2001 From: yude Date: Tue, 5 Mar 2024 09:56:40 +0900 Subject: [PATCH] Clear body on success --- src/components/Chat.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 14fea2f..3598689 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -48,6 +48,9 @@ export default function Chat() { async (text) => { if (text.includes("Success")) { await showAlert("送信しました。"); + setBody(""); + } else { + await showAlert("送信するときになんらかの問題が発生しました。" + text); } } )