Skip to content

Commit

Permalink
fix: context states resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
nhestrompia committed Sep 15, 2023
1 parent 6f2228d commit 28547bb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions web/src/app.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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 (
<StyledComponentsProvider>
<QueryClientProvider>
<RefetchOnBlock />
<Web3Provider>
<FilterProvider>
<FilterProvider key={routeKey}>
<SentryRoutes>
<Route path="/" element={<Layout />}>
<Route index element={<Home />} />
Expand Down

0 comments on commit 28547bb

Please sign in to comment.