Let's go Public

This commit is contained in:
Luke Berndt
2020-06-10 22:07:38 -04:00
parent bed8dba082
commit 6ec65eae48
3 changed files with 63 additions and 26 deletions

View File

@@ -22,7 +22,7 @@ import {Waypoint} from 'react-waypoint';
import "./CallPlayer.css";
//import setupSocket from '../socket/SetupSocket.js'
import queryString from '../query-string';
import ReactGA from 'react-ga';
@@ -168,10 +168,7 @@ class CallPlayer extends React.Component {
var filter = this.getFilter();
this.startSocket(this.props.shortName, filter.type, filter.code, filter.filterStarred);
//this.socket = setupSocket(this.addCall, this.props.shortName);
ReactGA.event({
category: 'Live',
action: 'Toggle Live'
});
}
}
@@ -216,10 +213,6 @@ class CallPlayer extends React.Component {
this.setState({ callUrl: "", callId: false});
this.stopSocket();
ReactGA.event({
category: 'Filter',
action: 'Set Date'
});
//this.socket.close();
}
@@ -412,11 +405,7 @@ class CallPlayer extends React.Component {
filterCode = nextProps.filterTalkgroups;
break;
}
ReactGA.event({
category: 'Filter',
action: 'Set Filter',
value: nextProps.filterType
});
this.updateUri(nextProps);
if (this.props.live) {
this.startSocket(this.props.shortName, typeString, filterCode, nextProps.filterStarred);

View File

@@ -10,7 +10,6 @@ import { routerMiddleware } from 'connected-react-router'
import isNode from "detect-node"
import createRootReducer from './reducers'
import createHistory from 'history/createBrowserHistory'
import ReactGA from 'react-ga';
import App from "./components/container/App"
import About from "./components/pure/About"
@@ -27,11 +26,7 @@ import CallPlayerContainer from "./Call/CallPlayerContainer"
// Create a history of your choosing (we're using a browser history in this case)
const history = createHistory()
ReactGA.initialize('UA-45563211-1');
history.listen((location, action) => {
ReactGA.pageview(location.pathname + location.search);
console.log(location.pathname)
});
// Build the middleware for intercepting and dispatching navigation actions
const historyMiddleware = routerMiddleware(history)