prevent scrolling to top on chat creation (#189)

This commit is contained in:
Markeljan Sokoli 2023-12-04 12:43:17 -05:00 committed by GitHub
parent be90a40427
commit c368a0967c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ export function Chat({ id, initialMessages, className }: ChatProps) {
},
onFinish() {
if (!path.includes('chat')) {
router.push(`/chat/${id}`, { shallow: true })
router.push(`/chat/${id}`, { shallow: true, scroll: false })
router.refresh()
}
}