Refactor component

This removes a unnessary `div` and a duplicate link
This commit is contained in:
Marcus Blättermann 2023-01-24 07:44:39 +01:00
parent 73344b539e
commit 50ccbcebbf
No known key found for this signature in database
GPG Key ID: A1E1F04008AC450D

View File

@ -9,15 +9,15 @@ import classes from '../styles/readnext.module.sass'
export default function ReadNext({ title, to }) { export default function ReadNext({ title, to }) {
return ( return (
<div className={classes.root}> <Link to={to} noLinkLayout className={classes.root}>
<Link to={to} noLinkLayout> <span>
<Label>Read next</Label> <Label>Read next</Label>
{title} {title}
</Link> </span>
<Link to={to} noLinkLayout className={classes.icon}> <span className={classes.icon}>
<Icon name="arrowright" aria-hidden="true" /> <Icon name="arrowright" aria-hidden="true" />
</Link> </span>
</div> </Link>
) )
} }