We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 109f2fc + d8a497e commit 6fcc749Copy full SHA for 6fcc749
app/src/components/pages/chat.tsx
@@ -35,12 +35,14 @@ export default function ChatPage(props: any) {
35
const { id } = useParams();
36
const context = useAppContext();
37
38
+ let firstLoad = true;
39
useEffect(() => {
40
if (props.share || !context.currentChat.chatLoadedAt) {
41
return;
42
}
43
- const shouldScroll = (Date.now() - context.currentChat.chatLoadedAt) > 5000;
44
+ const shouldScroll = (Date.now() - context.currentChat.chatLoadedAt) > 5000 || firstLoad;
45
+ firstLoad = false;
46
47
if (!shouldScroll) {
48
0 commit comments