mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
11 lines
463 B
TypeScript
11 lines
463 B
TypeScript
|
import { useConnectionContext } from '@/features/ide-react/context/connection-context'
|
||
|
import useEventListener from '@/shared/hooks/use-event-listener'
|
||
|
import useDomEventListener from '@/shared/hooks/use-dom-event-listener'
|
||
|
|
||
|
export function useRegisterUserActivity() {
|
||
|
const { registerUserActivity } = useConnectionContext()
|
||
|
|
||
|
useEventListener('cursor:editor:update', registerUserActivity)
|
||
|
useDomEventListener(document.body, 'click', registerUserActivity)
|
||
|
}
|