aboutsummaryrefslogtreecommitdiffstats
path: root/src/App.tsx
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2021-02-21 07:35:29 +0200
committerGravatar ks129 <[email protected]>2021-02-21 07:35:29 +0200
commitb1f05fa57c862ce8219e5ca464e794353261f842 (patch)
treeff67e7265ad52099181ceb0bf2a0af36f0525fdd /src/App.tsx
parentMove hCaptcha types library to dev-dependencies (diff)
Migrate from public state map to Redux
Diffstat (limited to 'src/App.tsx')
-rw-r--r--src/App.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/App.tsx b/src/App.tsx
index 523e583..14e5329 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -3,6 +3,7 @@
import React, { Suspense } from "react";
import { jsx, css, Global } from "@emotion/react";
+import { Provider } from "react-redux";
import {
BrowserRouter as Router,
Route,
@@ -14,6 +15,7 @@ import { PropagateLoader } from "react-spinners";
import { CSSTransition, TransitionGroup } from "react-transition-group";
import globalStyles from "./globalStyles";
+import { store } from "./store/form/store";
const LandingPage = React.lazy(() => import("./pages/LandingPage"));
const FormPage = React.lazy(() => import("./pages/FormPage"));
@@ -51,7 +53,7 @@ function App(): JSX.Element {
{routes.map(({path, Component}) => (
<Route exact key={path} path={path}>
<Suspense fallback={<PageLoading/>}>
- <Component/>
+ {path == "/form/:id" ? <Provider store={store}><Component/></Provider> : <Component/>}
</Suspense>
</Route>
))}