Closed dmbaranov closed 6 years ago
Hi. I'm trying to use next-routes together with styled-components. Let's say my component with link looks like this:
const StyledLink = styled.a` ... `; ... <Link route="mainPage"> <StyledLink>Main page</StyledLink> </Link>
In this case there are no href on the a tag. But if instead of StyledLink I use <a className="my-link">Main page</a>, it works perfectly. Do you have any ideas how I can solve it? Thanks in advance!
href
a
<a className="my-link">Main page</a>
@dmt-13 you can use the passHref property https://github.com/zeit/next.js/issues/1942
passHref
Awesome, thanks a lot! Sorry for opening this issue, didn't know about that property.
Hi. I'm trying to use next-routes together with styled-components. Let's say my component with link looks like this:
In this case there are no
href
on thea
tag. But if instead of StyledLink I use<a className="my-link">Main page</a>
, it works perfectly. Do you have any ideas how I can solve it? Thanks in advance!