fix: turned off page logging on logout (#550)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 4 years ago
parent 64403dd85e
commit 77daf294b8
  1. 1
      Makefile
  2. 9
      src/hooks/usePageLogger.tsx

@ -27,6 +27,7 @@ facr-production-build: clean
prod: production-build
rsync -zavP build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/wwwroot/
rsync -zavP build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/wwwroot/
rsync -zavP build/ -e 'ssh -p 666' ott@bkup.instat.tv:/usr/local/www/ott/wwwroot/
preprod: preproduction-build
rsync -zavP build/ -e 'ssh -p 666' ott-test@test.instat.tv:/usr/local/www/ott-test/wwwroot/

@ -3,14 +3,12 @@ import {
useEffect,
useCallback,
} from 'react'
import { useLocation } from 'react-router'
import round from 'lodash/round'
import { LogActions, logUserAction } from 'requests/logUserAction'
import { useEventListener } from 'hooks'
import { useLocation } from 'react-router'
export const usePageLogger = (page?: string) => {
const location = useLocation()
const startTimeRef = useRef(new Date())
@ -42,9 +40,4 @@ export const usePageLogger = (page?: string) => {
log,
resetTime,
])
useEventListener({
callback: log,
event: 'beforeunload',
})
}

Loading…
Cancel
Save