From 23ad285a4b63bfcfec9006d3d3537f4fc6c54ccf Mon Sep 17 00:00:00 2001 From: Jason Banich Date: Sat, 1 Apr 2023 22:02:15 -0700 Subject: [PATCH] Adds a loading spinner that replaces send icon while result is generated (#329) --- components/Chat/ChatInput.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/Chat/ChatInput.tsx b/components/Chat/ChatInput.tsx index 2a7b5de..072b96b 100644 --- a/components/Chat/ChatInput.tsx +++ b/components/Chat/ChatInput.tsx @@ -286,7 +286,11 @@ export const ChatInput: FC = ({ className="absolute right-2 top-2 rounded-sm p-1 text-neutral-800 opacity-60 hover:bg-neutral-200 hover:text-neutral-900 dark:bg-opacity-50 dark:text-neutral-100 dark:hover:text-neutral-200" onClick={handleSend} > - + {messageIsStreaming ? ( +
+ ) : ( + + )} {showPromptList && filteredPrompts.length > 0 && (