From 546af6e46b76668103e368f27952b65b64cb2087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Chimanshu=E2=80=9D?= Date: Wed, 20 Jan 2021 04:45:52 +0530 Subject: [PATCH] Gitignore env and Add redux dev tools --- .gitignore | 4 +++- frontend/src/index.tsx | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index dd384a51ffd2..06628edacde2 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ frontend/.yarnclean frontend/npm-debug.log* frontend/yarn-debug.log* frontend/yarn-error.log* +frontend/src/constants/env.ts .idea @@ -26,4 +27,5 @@ frontend/yarn-error.log* *.tgz **/build **/storage -**/locust-scripts/__pycache__/ \ No newline at end of file +**/locust-scripts/__pycache__/ + diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index b795a595b4ea..77af094bec5d 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -1,7 +1,7 @@ import React from "react"; import ReactDOM from "react-dom"; import { Provider } from "react-redux"; -import { createStore, applyMiddleware } from "redux"; +import { createStore, applyMiddleware, compose } from "redux"; import { ThemeSwitcherProvider } from "react-css-theme-switcher"; import thunk from "redux-thunk"; // import { NavLink, BrowserRouter as Router, Route, Switch } from 'react-router-dom'; @@ -10,8 +10,9 @@ import AppWrapper from "./components/AppWrapper"; import "./assets/index.css"; import { reducers } from "./reducers"; // import Signup from './components/Signup'; - -const store = createStore(reducers, applyMiddleware(thunk)); +// @ts-ignore +const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; +const store = createStore(reducers, composeEnhancers(applyMiddleware(thunk))); const themes = { dark: `${process.env.PUBLIC_URL}/dark-theme.css`,