Fix basePath?
This commit is contained in:
parent
b0f4cc2781
commit
144574535a
1 changed files with 2 additions and 2 deletions
|
@ -3,8 +3,8 @@ import { useRouter } from "next/router";
|
||||||
|
|
||||||
const Link = (props: LinkProps) => {
|
const Link = (props: LinkProps) => {
|
||||||
const { basePath } = useRouter();
|
const { basePath } = useRouter();
|
||||||
|
const href = basePath ? `/${basePath}/${props.href}` : props.href;
|
||||||
return <GeistLink {...props} href={`/${basePath}/${props.href}`} />
|
return <GeistLink {...props} href={href} />
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Link
|
export default Link
|
Loading…
Reference in a new issue