1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00

use forwardRef

This commit is contained in:
Nebel 2020-02-09 03:07:40 +09:00
parent b8c39168a0
commit 2d1f516bd3

View file

@ -26,12 +26,12 @@ const TopAppBar = () => {
key={pathname} key={pathname}
value={pathname} value={pathname}
icon={icon} icon={icon}
component={React.forwardRef(props => ( component={React.forwardRef<HTMLAnchorElement, {}>((props, ref) => (
<Link <Link
href={pathname} href={pathname}
as={`${process.env.NEXT_BASE_PATH}${pathname}`} as={`${process.env.NEXT_BASE_PATH}${pathname}`}
> >
<a {...props} /> <a ref={ref} {...props} />
</Link> </Link>
))} ))}
/> />