From 551630f0f1fd75d791e4d43b9f381b59bca16b21 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Sun, 28 Jul 2024 15:19:36 +0530 Subject: [PATCH] Code clean-up and some fit and finish - Add a lot more suggestions cards, improve mobile rendering of suggestion cards, improve alignment of chat input, shift message when starts recording voice, remove dead code --- .../chatInputArea/chatInputArea.tsx | 11 +- .../web/app/components/navMenu/navMenu.tsx | 4 - .../components/suggestions/suggestionCard.tsx | 10 +- .../components/suggestions/suggestionsData.ts | 275 ++++++++++++++++++ src/interface/web/app/page.module.css | 4 +- src/interface/web/app/page.tsx | 92 ++---- 6 files changed, 324 insertions(+), 72 deletions(-) create mode 100644 src/interface/web/app/components/suggestions/suggestionsData.ts diff --git a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx index 892850b9..0f8f498b 100644 --- a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx +++ b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx @@ -258,7 +258,7 @@ export default function ChatInputArea(props: ChatInputProps) { useEffect(() => { if (!chatInputRef.current) return; chatInputRef.current.style.height = 'auto'; - chatInputRef.current.style.height = Math.max(chatInputRef.current.scrollHeight-24, 64) + 'px'; + chatInputRef.current.style.height = Math.max(chatInputRef.current.scrollHeight - 24, 64) + 'px'; }, [message]); return ( @@ -398,7 +398,9 @@ export default function ChatInputArea(props: ChatInputProps) {