From 31e7c9828f985eceb16b4c9c749cc5d4d9fd5beb Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 6 Aug 2023 13:28:22 -0700 Subject: feat: :construction: react-router-dom work --- extension/react-app/src/pages/gui.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'extension/react-app/src/pages/gui.tsx') diff --git a/extension/react-app/src/pages/gui.tsx b/extension/react-app/src/pages/gui.tsx index 247789d6..d565e64f 100644 --- a/extension/react-app/src/pages/gui.tsx +++ b/extension/react-app/src/pages/gui.tsx @@ -34,6 +34,7 @@ import { setBottomMessageCloseTimeout, } from "../redux/slices/uiStateSlice"; import RingLoader from "../components/RingLoader"; +import { useNavigate } from "react-router-dom"; const TopGUIDiv = styled.div` overflow: hidden; @@ -83,6 +84,8 @@ interface GUIProps { } function GUI(props: GUIProps) { + const navigate = useNavigate(); + const client = useContext(GUIClientContext); const posthog = usePostHog(); @@ -595,7 +598,7 @@ If you already have an LLM deployed on your own infrastructure, or would like to { // Go to /history page - document.location.href = "/history"; + navigate("/history"); }} text="History" > -- cgit v1.2.3-70-g09d2