import styled from '@emotion/styled'; import Access from 'sentry/components/acl/access'; import NumberField from 'sentry/components/forms/fields/numberField'; import Form from 'sentry/components/forms/form'; import Panel from 'sentry/components/panels/panel'; import PanelBody from 'sentry/components/panels/panelBody'; import PanelHeader from 'sentry/components/panels/panelHeader'; import {t} from 'sentry/locale'; import type {Project} from 'sentry/types/project'; import useOrganization from 'sentry/utils/useOrganization'; type Props = { project: Project; }; const DEFAULT_LIMIT = '5000'; function transformData(data) { const limit = data.relayCustomMetricCardinalityLimit; return { relayCustomMetricCardinalityLimit: limit === '' || limit === DEFAULT_LIMIT ? null : limit, }; } export function CardinalityLimit({project}: Props) { const organization = useOrganization(); const endpoint = `/projects/${organization.slug}/${project.slug}/`; return (
); } const StyledNumberField = styled(NumberField)` ${p => p.disabled && `cursor: not-allowed`} `;