From 6f88994f24d290dc4658aa9b6de99c0dd2193521 Mon Sep 17 00:00:00 2001 From: Alexandre Bourdin Date: Wed, 12 Oct 2022 16:18:08 +0200 Subject: [PATCH] Merge pull request #9932 from overleaf/ab-react-dash-event [web] Add loads_v2_dash event to the React dashboard GitOrigin-RevId: 14fad90bb434b3b3855ed30e0159abb7e7d61c47 --- .../features/project-list/components/project-list-root.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/web/frontend/js/features/project-list/components/project-list-root.tsx b/services/web/frontend/js/features/project-list/components/project-list-root.tsx index 758d31b5c9..34cc546d1d 100644 --- a/services/web/frontend/js/features/project-list/components/project-list-root.tsx +++ b/services/web/frontend/js/features/project-list/components/project-list-root.tsx @@ -2,6 +2,7 @@ import { ProjectListProvider, useProjectListContext, } from '../context/project-list-context' +import * as eventTracking from '../../../infrastructure/event-tracking' import { Col, Row } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import useWaitForI18n from '../../../shared/hooks/use-wait-for-i18n' @@ -18,6 +19,7 @@ import ProjectsDropdown from './dropdown/projects-dropdown' import SortByDropdown from './dropdown/sort-by-dropdown' import ProjectTools from './table/project-tools/project-tools' import LoadMore from './load-more' +import { useEffect } from 'react' function ProjectListRoot() { const { isReady } = useWaitForI18n() @@ -40,6 +42,10 @@ function ProjectListPageContent() { selectedProjects, } = useProjectListContext() + useEffect(() => { + eventTracking.sendMB('loads_v2_dash', {}) + }, []) + return isLoading ? (