reviewAction.tsx 941 B

1234567891011121314151617181920212223242526272829303132333435
  1. import ActionLink from 'sentry/components/actions/actionLink';
  2. import {TooltipProps} from 'sentry/components/tooltip';
  3. import {IconIssues} from 'sentry/icons';
  4. import {t} from 'sentry/locale';
  5. import useOrganization from 'sentry/utils/useOrganization';
  6. type Props = {
  7. onUpdate: (data: {inbox: boolean}) => void;
  8. disabled?: boolean;
  9. tooltip?: string;
  10. tooltipProps?: Omit<TooltipProps, 'children' | 'title' | 'skipWrapper'>;
  11. };
  12. function ReviewAction({disabled, onUpdate, tooltipProps, tooltip}: Props) {
  13. const organization = useOrganization();
  14. if (organization.features.includes('escalating-issues')) {
  15. return null;
  16. }
  17. return (
  18. <ActionLink
  19. type="button"
  20. disabled={disabled}
  21. onAction={() => onUpdate({inbox: false})}
  22. icon={<IconIssues size="xs" />}
  23. title={tooltip}
  24. tooltipProps={tooltipProps}
  25. >
  26. {t('Mark Reviewed')}
  27. </ActionLink>
  28. );
  29. }
  30. export default ReviewAction;