CustomerSupportButton.tsx 531 B

1234567891011121314151617181920
  1. import React from 'react';
  2. import { LinkButton } from '@grafana/ui';
  3. export interface Props {
  4. orgSlug?: string;
  5. licenseId?: string;
  6. }
  7. export const CustomerSupportButton = ({ orgSlug, licenseId }: Props) => {
  8. let href = 'https://grafana.com/contact';
  9. if (orgSlug && licenseId) {
  10. href = `https://grafana.com/orgs/${orgSlug}/tickets?support=licensing&licenseId=${licenseId}`;
  11. }
  12. return (
  13. <LinkButton href={href} target="_blank" rel="noopener noreferrer">
  14. Contact customer support
  15. </LinkButton>
  16. );
  17. };