|
1 | 1 | import React from 'react' |
2 | 2 | /** @jsxImportSource @emotion/react */ |
3 | 3 |
|
4 | | -import merge from 'lodash/merge' |
5 | | -import { Box } from '@mui/material' |
| 4 | +import { useTranslation } from 'react-i18next' |
6 | 5 |
|
| 6 | +import merge from 'lodash/merge' |
7 | 7 | import { Link } from 'react-router-dom' |
8 | 8 |
|
| 9 | +import Box from '@mui/material/Box' |
| 10 | + |
9 | 11 | import hyLogo from '../../assets/hy_logo.svg' |
10 | 12 |
|
11 | 13 | import { useUiConfig } from '../CustomUiConfigProvider' |
@@ -43,16 +45,17 @@ const styles = { |
43 | 45 | } |
44 | 46 |
|
45 | 47 | const Logo = ({ guest = false }) => { |
| 48 | + const { t } = useTranslation() |
46 | 49 | const customUiConfig = useUiConfig() |
47 | 50 | const customStyles = customUiConfig?.styles?.logo ?? {} |
48 | 51 | const logoStyles = merge(styles, customStyles) |
49 | 52 | const customLogo = customUiConfig?.images?.logo |
50 | 53 |
|
51 | 54 | return ( |
52 | | - <Link to={guest ? '/noad' : '/'} style={{ textDecoration: 'none' }}> |
| 55 | + <Link to={guest ? '/noad' : '/'} style={{ textDecoration: 'none' }} aria-label={t('navBar:norppa')}> |
53 | 56 | <Box sx={logoStyles.link}> |
54 | | - <img src={customLogo || hyLogo} alt="HY" style={logoStyles.image} /> |
55 | | - <Box css={logoStyles.text}>Norppa</Box> |
| 57 | + <img src={customLogo || hyLogo} alt="" aria-hidden="true" style={logoStyles.image} /> |
| 58 | + <span style={logoStyles.text}>Norppa</span> |
56 | 59 | </Box> |
57 | 60 | </Link> |
58 | 61 | ) |
|
0 commit comments