Merge branch 'frost' of https://github.com/Aevann1/rDrama into frost

master
Aevann1 2022-09-25 05:29:41 +02:00
commit 18a5bc6108
2 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "chat",
"version": "0.0.21",
"version": "0.0.22",
"main": "./src/index.tsx",
"license": "MIT",
"dependencies": {

View File

@ -58,6 +58,13 @@ function AppInner() {
contentWrapper.current.scrollTop = contentWrapper.current.scrollHeight;
}
}, [messages]);
useEffect(() => {
if (!open) {
// Scroll to the bottom after any drawer closes.
contentWrapper.current.scrollTop = contentWrapper.current.scrollHeight;
}
}, [open]);
return (
<div className="App" ref={dropRef}>