diff --git a/src/components/MdxProvider.tsx b/src/components/MdxProvider.tsx index 4005597..cf848ce 100644 --- a/src/components/MdxProvider.tsx +++ b/src/components/MdxProvider.tsx @@ -176,8 +176,9 @@ export const QueryParam = (props: {param: string, fallback?: string}) => { return params.get(param) ?? fallback; }; -export const Anchor = (props: {children: React.ReactNode, href: string}) => { - return ; +export const Anchor = (props: {children: React.ReactNode, href?: string, to?: string}) => { + const href = props.href || props.to; + return ; } export const MdxComponents = {