Merge pull request #5985 from overleaf/jel-detached-event

Analytics event when PDF detach layout setup done

GitOrigin-RevId: 9f20a339ed9a45f9d85e1872454fe50236178aac
This commit is contained in:
Jessica Lawshe 2022-01-12 10:19:44 -06:00 committed by Copybot
parent e8a4a88e87
commit c849b8f244

View file

@ -29,6 +29,15 @@ export default function useDetachLayout() {
setIsLinking(false)
}, [isLinked, setIsLinking])
useEffect(() => {
if (debugPdfDetach) {
console.log('Effect', { role, isLinked })
}
if (role === 'detached' && isLinked) {
eventTracking.sendMB('project-layout-detached')
}
}, [role, isLinked])
useEffect(() => {
if (uiTimeoutRef.current) {
clearTimeout(uiTimeoutRef.current)