index.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. import Form from 'sentry/components/forms/form';
  2. import ExternalLink from 'sentry/components/links/externalLink';
  3. import NarrowLayout from 'sentry/components/narrowLayout';
  4. import {tct} from 'sentry/locale';
  5. export type ParntershipAgreementType = 'standard' | 'partner_presence';
  6. type Props = {
  7. agreements: Array<ParntershipAgreementType>,
  8. partnerDisplayName: string,
  9. onSubmitSuccess?: () => void;
  10. };
  11. export default function PartnershipAgreement({partnerDisplayName, agreements, onSubmitSuccess}: Props) {
  12. const tos = <ExternalLink href='https://sentry.io/terms/'>terms of service</ExternalLink>;
  13. const privacyPolicy = <ExternalLink href='https://sentry.io/privacy/'>privacy policy</ExternalLink>;
  14. // TODO @athena: Add API call to the form
  15. return (
  16. <NarrowLayout>
  17. <Form submitLabel="Continue" onSubmitSuccess={onSubmitSuccess}>
  18. {agreements.includes('partner_presence')
  19. ? tct(
  20. "This organization is created in partnership with [partnerDisplayName]. By pressing continue, you acknowledge that you have agreed to Sentry's [tos] and [privacyPolicy] through the partner's application and are aware of the partner's presence in the organization as a manager.",
  21. {partnerDisplayName, tos, privacyPolicy}
  22. )
  23. : tct(
  24. "This organization is created in partnership with [partnerDisplayName]. By pressing continue, you acknowledge that you have agreed to Sentry's [tos] and [privacyPolicy] through the partner's application.",
  25. {partnerDisplayName, tos, privacyPolicy}
  26. )
  27. }
  28. </Form>
  29. </NarrowLayout>
  30. );
  31. }