Fix basePath?

pull/15/head
Max Leiter 4 years ago
parent b0f4cc2781
commit 144574535a
No known key found for this signature in database
GPG Key ID: A3512F2F2F17EBDA

@ -3,8 +3,8 @@ import { useRouter } from "next/router";
const Link = (props: LinkProps) => {
const { basePath } = useRouter();
return <GeistLink {...props} href={`/${basePath}/${props.href}`} />
const href = basePath ? `/${basePath}/${props.href}` : props.href;
return <GeistLink {...props} href={href} />
}
export default Link
Loading…
Cancel
Save