mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-27 20:56:12 +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
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue