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
+4 -2
View File
@@ -1,13 +1,15 @@
import {IconButton, Stack} from '@mui/material'
import {IconButton, Stack, Link} from '@mui/material'
import PropTypes from 'prop-types'
export default function Rezo({rezo}) {
const {tit, lyen, icon} = rezo
return (
<Stack direction='row' spacing={1}>
<IconButton title={tit} onClick={() => window.open(lyen, '_blank')}>
<Link target='_blank' rel='noreferrer' href={lyen}>
<IconButton title={tit}>
{icon}
</IconButton>
</Link>
</Stack>
)
}