index.tsx 576 B

1234567891011121314151617181920
  1. import withOrganization from 'sentry/utils/withOrganization';
  2. import PermissionAlert from 'sentry/views/settings/organization/permissionAlert';
  3. import OrganizationRateLimits from './organizationRateLimits';
  4. function OrganizationRateLimitsContainer(
  5. props: React.ComponentProps<typeof OrganizationRateLimits>
  6. ) {
  7. if (!props.organization) {
  8. return null;
  9. }
  10. return props.organization.access.includes('org:write') ? (
  11. <OrganizationRateLimits {...props} />
  12. ) : (
  13. <PermissionAlert />
  14. );
  15. }
  16. export default withOrganization(OrganizationRateLimitsContainer);