useDocumentTitle changes title on first title change, scrollBar renders when expected

This commit is contained in:
Daniel Avila 2023-02-14 21:23:14 -05:00
parent 7347eda219
commit f18317f7b7
5 changed files with 16 additions and 85 deletions

View file

@ -18,7 +18,7 @@ const Messages = ({ messages }) => {
return () => {
clearTimeout(timeoutId);
};
}, []);
}, [messages]);
const scrollToBottom = () => {
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
@ -72,7 +72,7 @@ const Messages = ({ messages }) => {
timeout={400}
classNames="scroll-down"
unmountOnExit={false}
appear
// appear
>
{(state) => showScrollButton && <ScrollToBottom scrollHandler={scrollHandler} />}
</CSSTransition>