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'
|
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}>
|
||||||
|
<IconButton title={tit}>
|
||||||
{icon}
|
{icon}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
</Link>
|
||||||
</Stack>
|
</Stack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user