Replace onClick by Link mui component in Rezo

This commit is contained in:
Cédric FAMIBELLE-PRONZOLA
2022-01-26 07:10:30 +04:00
parent beba604bd7
commit 818d6335e9
+6 -4
View File
@@ -1,13 +1,15 @@
import {IconButton, Stack} from '@mui/material' import {IconButton, Stack, Link} from '@mui/material'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
export default function Rezo({rezo}) { export default function Rezo({rezo}) {
const {tit, lyen, icon} = rezo const {tit, lyen, icon} = rezo
return ( return (
<Stack direction='row' spacing={1}> <Stack direction='row' spacing={1}>
<IconButton title={tit} onClick={() => window.open(lyen, '_blank')}> <Link target='_blank' rel='noreferrer' href={lyen}>
{icon} <IconButton title={tit}>
</IconButton> {icon}
</IconButton>
</Link>
</Stack> </Stack>
) )
} }