import { Checkbox } from '@vegaprotocol/ui-toolkit'; import { t } from '@vegaprotocol/i18n'; import { useTelemetryApproval } from '../../lib/hooks/use-telemetry-approval'; export const TelemetryApproval = ({ isSettingsPage, }: { isSettingsPage?: boolean; }) => { const [isApproved, setIsApproved] = useTelemetryApproval(); return (
{t('Share usage data')}} checked={isApproved} name="telemetry-approval" onCheckedChange={() => setIsApproved(!isApproved)} />
{t( 'Help identify bugs and improve the service by sharing anonymous usage data.' )} {!isSettingsPage && ' ' + t('You can change this in your settings at any time.')}
); };