CoastalCommitsPastes/client/components/Link.tsx

10 lines
320 B
TypeScript
Raw Normal View History

2022-03-06 20:20:01 -05:00
import { Link as GeistLink, LinkProps } from "@geist-ui/core"
import { useRouter } from "next/router";
const Link = (props: LinkProps) => {
const { basePath } = useRouter();
2022-03-06 20:25:23 -05:00
const href = basePath ? `/${basePath}/${props.href}` : props.href;
return <GeistLink {...props} href={href} />
2022-03-06 20:20:01 -05:00
}
export default Link