mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-28 22:28:51 +01:00
useDocumentTitle changes title on first title change, scrollBar renders when expected
This commit is contained in:
parent
7347eda219
commit
f18317f7b7
5 changed files with 16 additions and 85 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ function useDocumentTitle(title, prevailOnUnmount = false) {
|
|||
document.title = title;
|
||||
}, [title]);
|
||||
|
||||
useEffect(
|
||||
() => () => {
|
||||
if (!prevailOnUnmount) {
|
||||
document.title = defaultTitle.current;
|
||||
}
|
||||
}, []
|
||||
);
|
||||
// useEffect(
|
||||
// () => () => {
|
||||
// if (!prevailOnUnmount) {
|
||||
// document.title = defaultTitle.current;
|
||||
// }
|
||||
// }, []
|
||||
// );
|
||||
}
|
||||
|
||||
export default useDocumentTitle;
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@
|
|||
.scroll-down-enter {
|
||||
opacity: 0;
|
||||
}
|
||||
.scroll-down-appear {
|
||||
/* .scroll-down-appear {
|
||||
opacity: 0;
|
||||
}
|
||||
} */
|
||||
|
||||
.scroll-down-enter-active {
|
||||
opacity: 1;
|
||||
transition: opacity 650ms;
|
||||
transition: opacity 400ms;
|
||||
}
|
||||
|
||||
.scroll-down-exit {
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
.scroll-down-exit-active {
|
||||
opacity: 0;
|
||||
transition: opacity 650ms;
|
||||
transition: opacity 400ms;
|
||||
}
|
||||
|
||||
.blink {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue