sidebarHelpMenu.tsx 921 B

12345678910111213141516171819202122232425262728293031
  1. import SidebarMenuItem from 'sentry/components/sidebar/sidebarMenuItem';
  2. import {t} from 'sentry/locale';
  3. import type {Organization} from 'sentry/types/organization';
  4. import withOrganization from 'sentry/utils/withOrganization';
  5. import ZendeskLink from 'getsentry/components/zendeskLink';
  6. type Props = {
  7. organization: Organization;
  8. };
  9. function SupportLink({organization}: Props) {
  10. return (
  11. <ZendeskLink
  12. source="help_sidebar"
  13. organization={organization}
  14. Component={({href, onClick}) => (
  15. <SidebarMenuItem openInNewTab={false} href={href} onClick={e => onClick(e)}>
  16. {t('Contact Support')}
  17. </SidebarMenuItem>
  18. )}
  19. />
  20. );
  21. }
  22. const SidebarHelpMenu = withOrganization(SupportLink);
  23. const hookSidebarHelpMenu = <T extends Record<PropertyKey, unknown>>(props: T) => (
  24. <SidebarHelpMenu key="sidebar:help-menu" {...props} />
  25. );
  26. export default hookSidebarHelpMenu;