Reinstating initial setup; Only reporting to analytics where approved, fixes #247 and #268

This commit is contained in:
James Barnsley
2018-06-05 13:43:02 +12:00
parent 984d613e17
commit c27588f2f0
22 changed files with 26310 additions and 24003 deletions

View File

@ -28,7 +28,9 @@ const UIMiddleware = (function(){
break
case 'OPEN_MODAL':
ReactGA.event({ category: 'Modal', action: 'Opened', label: action.modal.name })
if (store.getState().ui.allow_reporting){
ReactGA.event({ category: 'Modal', action: 'Opened', label: action.modal.name });
}
$('body').addClass('modal-open')
store.dispatch(uiActions.hideContextMenu())
store.dispatch(uiActions.hideTouchContextMenu())
@ -36,7 +38,9 @@ const UIMiddleware = (function(){
break
case 'CLOSE_MODAL':
ReactGA.event({ category: 'Modal', action: 'Closed', label: null })
if (store.getState().ui.allow_reporting){
ReactGA.event({ category: 'Modal', action: 'Closed', label: null });
}
$('body').removeClass('modal-open')
next(action)
break