index.tsx 821 B

1234567891011121314151617181920212223242526
  1. import Feature from 'sentry/components/acl/feature';
  2. import {NoAccess} from 'sentry/components/noAccess';
  3. import NoProjectMessage from 'sentry/components/noProjectMessage';
  4. import type {Organization} from 'sentry/types/organization';
  5. import useOrganization from 'sentry/utils/useOrganization';
  6. type Props = {
  7. children: React.ReactNode;
  8. organization: Organization;
  9. };
  10. export default function ExploreContainer({children}: Props) {
  11. const organization = useOrganization();
  12. return (
  13. <Feature
  14. // TODO: add a hook for when this is disabled
  15. // hookName="feature-disabled:explore-page"
  16. features="visibility-explore-view"
  17. organization={organization}
  18. renderDisabled={NoAccess}
  19. >
  20. <NoProjectMessage organization={organization}>{children}</NoProjectMessage>
  21. </Feature>
  22. );
  23. }