mirror of
https://github.com/strapi/strapi.git
synced 2025-08-10 17:58:07 +00:00
Merge pull request #12774 from strapi/dark-mode/tracking
[Dark mode] Tracking mode changes
This commit is contained in:
commit
fb3a9efa8f
@ -9,6 +9,7 @@ import {
|
|||||||
useNotification,
|
useNotification,
|
||||||
useOverlayBlocker,
|
useOverlayBlocker,
|
||||||
auth,
|
auth,
|
||||||
|
useTracking,
|
||||||
} from '@strapi/helper-plugin';
|
} from '@strapi/helper-plugin';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import { Formik } from 'formik';
|
import { Formik } from 'formik';
|
||||||
@ -64,6 +65,7 @@ const ProfilePage = () => {
|
|||||||
const { setUserDisplayName } = useAppInfos();
|
const { setUserDisplayName } = useAppInfos();
|
||||||
const queryClient = useQueryClient();
|
const queryClient = useQueryClient();
|
||||||
const { formatMessage } = useIntl();
|
const { formatMessage } = useIntl();
|
||||||
|
const { trackUsage } = useTracking();
|
||||||
const toggleNotification = useNotification();
|
const toggleNotification = useNotification();
|
||||||
const { lockApp, unlockApp } = useOverlayBlocker();
|
const { lockApp, unlockApp } = useOverlayBlocker();
|
||||||
const { notifyStatus } = useNotifyAT();
|
const { notifyStatus } = useNotifyAT();
|
||||||
@ -100,6 +102,7 @@ const ProfilePage = () => {
|
|||||||
setUserDisplayName(userDisplayName);
|
setUserDisplayName(userDisplayName);
|
||||||
changeLocale(data.preferedLanguage);
|
changeLocale(data.preferedLanguage);
|
||||||
onChangeTheme(data.currentTheme);
|
onChangeTheme(data.currentTheme);
|
||||||
|
trackUsage('didChangeMode', { newMode: data.currentTheme });
|
||||||
|
|
||||||
toggleNotification({
|
toggleNotification({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user