2021-01-18 02:18:49 +05:30
|
|
|
import React from "react";
|
|
|
|
|
import ReactDOM from "react-dom";
|
|
|
|
|
import { Provider } from "react-redux";
|
2021-01-20 04:45:52 +05:30
|
|
|
import { createStore, applyMiddleware, compose } from "redux";
|
2021-01-03 18:15:44 +05:30
|
|
|
import { ThemeSwitcherProvider } from "react-css-theme-switcher";
|
2021-01-18 02:18:49 +05:30
|
|
|
import thunk from "redux-thunk";
|
2021-01-08 20:48:18 +05:30
|
|
|
// import { NavLink, BrowserRouter as Router, Route, Switch } from 'react-router-dom';
|
2021-02-21 06:02:06 +05:30
|
|
|
import { Auth0Provider } from "@auth0/auth0-react";
|
2021-01-03 18:15:44 +05:30
|
|
|
|
2021-02-21 06:02:06 +05:30
|
|
|
import AppWrapper from "Src/components/AppWrapper";
|
|
|
|
|
import "Src/assets/index.css";
|
2021-01-18 02:18:49 +05:30
|
|
|
import { reducers } from "./reducers";
|
2021-02-21 06:02:06 +05:30
|
|
|
import {BrowserRouter as Router} from "react-router-dom";
|
|
|
|
|
import { AUTH0_CLIENT_ID, AUTH0_DOMAIN } from "./constants/env";
|
2021-01-08 20:48:18 +05:30
|
|
|
// import Signup from './components/Signup';
|
2021-01-20 04:45:52 +05:30
|
|
|
// @ts-ignore
|
|
|
|
|
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
|
|
|
|
|
const store = createStore(reducers, composeEnhancers(applyMiddleware(thunk)));
|
2021-01-03 18:15:44 +05:30
|
|
|
|
|
|
|
|
const themes = {
|
2021-02-21 06:02:06 +05:30
|
|
|
dark: `/dark-theme.css`,
|
|
|
|
|
light: `/light-theme.css`,
|
2021-01-03 18:15:44 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ReactDOM.render(
|
2021-01-18 02:18:49 +05:30
|
|
|
<Provider store={store}>
|
|
|
|
|
<React.StrictMode>
|
|
|
|
|
<ThemeSwitcherProvider themeMap={themes} defaultTheme="dark">
|
2021-02-21 06:02:06 +05:30
|
|
|
<Router basename="/">
|
|
|
|
|
<AppWrapper />
|
|
|
|
|
</Router>
|
2021-01-18 02:18:49 +05:30
|
|
|
</ThemeSwitcherProvider>
|
|
|
|
|
</React.StrictMode>
|
2021-02-21 06:02:06 +05:30
|
|
|
</Provider>
|
|
|
|
|
,
|
2021-01-18 02:18:49 +05:30
|
|
|
document.querySelector("#root"),
|
|
|
|
|
);
|