mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-26 04:08:01 +03:00
parent
bb43395a2d
commit
0470a4a431
@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import trackEvent from '../../../../utils/analytics';
|
||||
import {ConfigResponseType, configDataType} from '@tryghost/admin-x-framework/api/config';
|
||||
import {Toggle} from '@tryghost/admin-x-design-system';
|
||||
import {getSettingValue, useEditSettings} from '@tryghost/admin-x-framework/api/settings';
|
||||
@ -20,6 +21,7 @@ const FeatureToggle: React.FC<{ flag: string; label?: string; }> = ({label, flag
|
||||
key: 'labs',
|
||||
value: JSON.stringify({...labs, [flag]: newValue})
|
||||
}]);
|
||||
trackEvent('Feature Toggled', {state: newValue ? 'on' : 'off', feature: flag});
|
||||
client.setQueriesData([configDataType], current => ({
|
||||
config: {
|
||||
...(current as ConfigResponseType).config,
|
||||
|
Loading…
Reference in New Issue
Block a user