|
|
@@ -3,14 +3,17 @@ import './index.css';
|
|
|
import React from 'react';
|
|
|
import ReactDOM from 'react-dom';
|
|
|
import App from './app/App';
|
|
|
-import store from './app/store';
|
|
|
+import createStore from './app/store';
|
|
|
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
|
|
+
|
|
|
var searchParams = new URLSearchParams(window.location.search);
|
|
|
-if (searchParams.has("state")) {
|
|
|
- console.log("State received:", searchParams.get("state"));
|
|
|
-}
|
|
|
+const store = createStore(
|
|
|
+ searchParams.has("state")
|
|
|
+ ? JSON.parse(searchParams.get("state")!)
|
|
|
+ : undefined
|
|
|
+);
|
|
|
|
|
|
ReactDOM.render(
|
|
|
<Provider store={store}>
|