Skip to content

Commit ba32e8e

Browse files
committed
accept all
1 parent 6a44bdf commit ba32e8e

File tree

1 file changed

+4
-13
lines changed
  • libs/remix-ui/app/src/lib/remix-app/components/modals

1 file changed

+4
-13
lines changed

libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { useContext, useEffect, useState } from 'react'
22
import { FormattedMessage } from 'react-intl'
33
import { AppContext } from '../../context/context'
44
import { useDialogDispatchers } from '../../context/provider'
5-
import { AppModalCancelTypes } from '../../types'
65
declare global {
76
interface Window {
87
_paq: any
@@ -67,20 +66,12 @@ const MatomoDialog = (props: MatomoDialogProps) => {
6766
}
6867
}, [visible])
6968

70-
const declineModal = async (reason: AppModalCancelTypes) => {
71-
if (reason === AppModalCancelTypes.click || reason === AppModalCancelTypes.enter) {
72-
settings.updateMatomoAnalyticsChoice(false)
73-
// revoke tracking consent
74-
_paq.push(['forgetConsentGiven'])
75-
setVisible(false)
76-
}
77-
}
78-
7969
const handleAcceptAllClick = async () => {
80-
81-
// user has given consent to process their data
70+
// user has given all consent to process their data
8271
_paq.push(['setConsentGiven'])
83-
settings.updateMatomoAnalyticsChoice(true)
72+
settings.updateMatomoAnalyticsChoice(true) // Enable Matomo Anonymous analytics
73+
settings.updateMatomoPerfAnalyticsChoice(true) // Enable Matomo Performance analytics
74+
settings.updateCopilotChoice(true) // Enable RemixAI copilot
8475
setVisible(false)
8576
props.acceptAllFn()
8677
}

0 commit comments

Comments
 (0)