Replace onClick by Link mui component in Rezo
This commit is contained in:
+4
-2
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user