From 28547bb01e3850f39dae924ae0d5df5e7a52a775 Mon Sep 17 00:00:00 2001 From: nhestrompia Date: Fri, 15 Sep 2023 12:32:49 +0300 Subject: [PATCH] fix: context states resetting --- web/src/app.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/app.tsx b/web/src/app.tsx index 594489272..76e04424a 100644 --- a/web/src/app.tsx +++ b/web/src/app.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Route } from "react-router-dom"; +import { Route, useLocation } from "react-router-dom"; import { SentryRoutes } from "./utils/sentry"; import "react-loading-skeleton/dist/skeleton.css"; import "react-toastify/dist/ReactToastify.css"; @@ -16,12 +16,15 @@ import Courts from "./pages/Courts"; import DisputeTemplateView from "./pages/DisputeTemplateView"; const App: React.FC = () => { + const location = useLocation(); + + const routeKey = location.pathname; return ( - + }> } />