trialEnded.tsx 860 B

123456789101112131415161718192021222324252627282930313233
  1. import {Alert} from 'sentry/components/core/alert';
  2. import {tct} from 'sentry/locale';
  3. import ZendeskLink from 'getsentry/components/zendeskLink';
  4. import type {Subscription} from 'getsentry/types';
  5. type Props = {
  6. subscription: Subscription;
  7. };
  8. function TrialEnded({subscription}: Props) {
  9. const canRequestTrial =
  10. subscription.canSelfServe && subscription.planDetails?.trialPlan;
  11. if (subscription.isTrial || subscription.canTrial || !canRequestTrial) {
  12. return null;
  13. }
  14. const supportLink = <ZendeskLink subject="Request Another Trial" source="trial" />;
  15. return (
  16. <Alert.Container>
  17. <Alert type="info">
  18. {tct(
  19. 'Your free trial has ended. You may [supportLink:contact support] to request another trial.',
  20. {supportLink}
  21. )}
  22. </Alert>
  23. </Alert.Container>
  24. );
  25. }
  26. export default TrialEnded;