From 83d0443c8a697cf9709aef2fec34ea5cf2ca7dbc Mon Sep 17 00:00:00 2001 From: Daniel Avila Date: Sun, 9 Apr 2023 07:32:07 -0400 Subject: [PATCH] fix: page no longer refreshes on stop generating button --- client/src/components/Input/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/Input/index.jsx b/client/src/components/Input/index.jsx index e87f305ac7..067f1bcda9 100644 --- a/client/src/components/Input/index.jsx +++ b/client/src/components/Input/index.jsx @@ -62,7 +62,8 @@ export default function TextChat({ isSearchView = false }) { setText(''); }; - const handleStopGenerating = () => { + const handleStopGenerating = (e) => { + e.preventDefault(); stopGenerating(); };