index.tsx 1001 B

12345678910111213141516171819202122232425262728293031323334
  1. import {RouteComponentProps} from 'react-router';
  2. import Feature from 'sentry/components/acl/feature';
  3. import HookOrDefault from 'sentry/components/hookOrDefault';
  4. import NoProjectMessage from 'sentry/components/noProjectMessage';
  5. import {Organization} from 'sentry/types';
  6. import withOrganization from 'sentry/utils/withOrganization';
  7. type Props = RouteComponentProps<{}, {}> & {
  8. children: React.ReactNode;
  9. organization: Organization;
  10. };
  11. const BetaGracePeriodAlertHook = HookOrDefault({
  12. hookName: 'component:replay-beta-grace-period-alert',
  13. });
  14. function ReplaysContainer({organization, children}: Props) {
  15. return (
  16. <NoProjectMessage organization={organization}>
  17. <Feature
  18. features={['session-replay-beta-grace']}
  19. organization={organization}
  20. renderDisabled={false}
  21. >
  22. <BetaGracePeriodAlertHook organization={organization} />
  23. </Feature>
  24. {children}
  25. </NoProjectMessage>
  26. );
  27. }
  28. export default withOrganization(ReplaysContainer);