From 5d11cfa3438a65cf4e59686574dc4edfb906ab76 Mon Sep 17 00:00:00 2001 From: Jing Hua Date: Sun, 5 Mar 2023 01:33:46 +0800 Subject: [PATCH] style: improvements --- .../Chat/ChatContent/ChatContent.tsx | 2 +- .../Chat/ChatContent/ScrollToBottomButton.tsx | 8 ++- src/components/Menu/Menu.tsx | 53 +++++++++++-------- src/components/MobileBar/MobileBar.tsx | 1 + 4 files changed, 38 insertions(+), 26 deletions(-) diff --git a/src/components/Chat/ChatContent/ChatContent.tsx b/src/components/Chat/ChatContent/ChatContent.tsx index aea9de5..e7e96ca 100644 --- a/src/components/Chat/ChatContent/ChatContent.tsx +++ b/src/components/Chat/ChatContent/ChatContent.tsx @@ -66,7 +66,7 @@ const ChatContent = () => { Submit -
+
diff --git a/src/components/Chat/ChatContent/ScrollToBottomButton.tsx b/src/components/Chat/ChatContent/ScrollToBottomButton.tsx index 0318c03..976c005 100644 --- a/src/components/Chat/ChatContent/ScrollToBottomButton.tsx +++ b/src/components/Chat/ChatContent/ScrollToBottomButton.tsx @@ -1,13 +1,17 @@ import React from 'react'; -import { useScrollToBottom } from 'react-scroll-to-bottom'; +import { useAtBottom, useScrollToBottom } from 'react-scroll-to-bottom'; import DownArrow from '@icon/DownArrow'; const ScrollToBottomButton = () => { const scrollToBottom = useScrollToBottom(); + const [atBottom] = useAtBottom(); + return (