From c368a0967cc210cb11c54f1d0ed4511456c0fa3a Mon Sep 17 00:00:00 2001 From: Markeljan Sokoli Date: Mon, 4 Dec 2023 12:43:17 -0500 Subject: [PATCH] prevent scrolling to top on chat creation (#189) --- components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/chat.tsx b/components/chat.tsx index a4c60cc..8aaf8ec 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -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() } }