chore: Remove env variables in webpack bundle (#1353)

* chore: Remove env variables in webpack bundle

* remove unused globals

* refactor: consolidate window.env calls to single file

* fix: Slack client side integration auth

* fix: developers url
This commit is contained in:
Tom Moor
2020-07-18 11:02:40 -07:00
committed by GitHub
parent 24448c7504
commit 67981a351e
32 changed files with 186 additions and 206 deletions

View File

@ -13,6 +13,7 @@ import PoliciesStore from "stores/PoliciesStore";
import ViewsStore from "stores/ViewsStore";
import AuthStore from "stores/AuthStore";
import UiStore from "stores/UiStore";
import env from "env";
export const SocketContext: any = React.createContext();
@ -34,7 +35,7 @@ class SocketProvider extends React.Component<Props> {
@observable socket;
componentDidMount() {
if (!process.env.WEBSOCKETS_ENABLED) return;
if (!env.WEBSOCKETS_ENABLED) return;
this.socket = io(window.location.origin, {
path: "/realtime",