Skip to content

Commit

Permalink
track workspace migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Jul 29, 2024
1 parent 4c45684 commit 02d2834
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useTranslation } from 'react-i18next'
import parse from 'html-react-parser'
import { DatasetsMigration, DataviewType } from '@globalfishingwatch/api-types'
import { Button } from '@globalfishingwatch/ui-components'
import { TrackCategory, trackEvent } from 'features/app/analytics.hooks'
import {
selectDeprecatedDataviewInstances,
selectHasDeprecatedDataviewInstances,
Expand Down Expand Up @@ -121,10 +122,18 @@ export const useMigrateWorkspaceToast = () => {
toast.dismiss(toastId.current)
}
const dissmissToast = () => {
trackEvent({
category: TrackCategory.WorkspaceManagement,
action: 'Skip workspace migration',
})
closeToast()
}

const updateWorkspace = async () => {
trackEvent({
category: TrackCategory.WorkspaceManagement,
action: 'Migrate workspace',
})
toast.update(toastId.current, {
render: <ToastContent loading={true} />,
})
Expand Down

0 comments on commit 02d2834

Please sign in to comment.