back-to-projects-button.tsx 966 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { useTranslation } from 'react-i18next'
  2. import * as eventTracking from '../../../infrastructure/event-tracking'
  3. import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
  4. import MaterialIcon from '@/shared/components/material-icon'
  5. function BackToProjectsButton() {
  6. const { t } = useTranslation()
  7. return (
  8. <OLTooltip
  9. id="back-to-projects"
  10. description={t('back_to_your_projects')}
  11. overlayProps={{ placement: 'right' }}
  12. >
  13. <div className="toolbar-item">
  14. <a
  15. className="btn btn-full-height"
  16. draggable="false"
  17. href="/project"
  18. onClick={() => {
  19. eventTracking.sendMB('navigation-clicked-home')
  20. }}
  21. >
  22. <MaterialIcon
  23. type="home"
  24. className="align-text-bottom"
  25. accessibilityLabel={t('back_to_your_projects')}
  26. />
  27. </a>
  28. </div>
  29. </OLTooltip>
  30. )
  31. }
  32. export default BackToProjectsButton