diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 9e885304da..63eb5eac5f 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -1,7 +1,6 @@ import * as React from 'react' import dynamic from 'next/dynamic' import Image from 'next/image' -import Link from 'next/link' import { useRouter } from 'next/router' import cs from 'classnames' @@ -27,6 +26,7 @@ import { Page404 } from './Page404' import { PageAside } from './PageAside' import { PageHead } from './PageHead' import styles from './styles.module.css' +import PageLink from "@/components/PageLink"; // ----------------------------------------------------------------------------- // dynamic imports for optional components @@ -154,7 +154,7 @@ export const NotionPage: React.FC = ({ const components = React.useMemo( () => ({ nextImage: Image, - nextLink: Link, + PageLink, Code, Collection, Equation, diff --git a/components/PageLink.tsx b/components/PageLink.tsx new file mode 100644 index 0000000000..1fefef52c3 --- /dev/null +++ b/components/PageLink.tsx @@ -0,0 +1,20 @@ +import React, { FC } from 'react' +import Link from 'next/link' + +type NextLinkProps = { + href: string + className?: string + children: React.ReactNode +} + +const PageLink: FC = ({ href, className, children }) => { + return ( + + + {children} + + + ) +} + +export default PageLink