summaryrefslogtreecommitdiff
path: root/extension/react-app/src/pages/gui.tsx
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-06 13:28:22 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-06 13:28:22 -0700
commit31e7c9828f985eceb16b4c9c749cc5d4d9fd5beb (patch)
tree8af6fe16ec3ad9bd836408a4300b13a5296e89ba /extension/react-app/src/pages/gui.tsx
parentf19345c652cfcf1bdf13d0a44a2f302e0cd1aa4c (diff)
downloadsncontinue-31e7c9828f985eceb16b4c9c749cc5d4d9fd5beb.tar.gz
sncontinue-31e7c9828f985eceb16b4c9c749cc5d4d9fd5beb.tar.bz2
sncontinue-31e7c9828f985eceb16b4c9c749cc5d4d9fd5beb.zip
feat: :construction: react-router-dom work
Diffstat (limited to 'extension/react-app/src/pages/gui.tsx')
-rw-r--r--extension/react-app/src/pages/gui.tsx5
1 files changed, 4 insertions, 1 deletions
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
<HeaderButtonWithText
onClick={() => {
// Go to /history page
- document.location.href = "/history";
+ navigate("/history");
}}
text="History"
>