mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-13 23:45:30 -04:00
passing a custom link component to mdx was unnecessary
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
import { NextSeo } from "next-seo";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
import angryPandaGif from "../public/static/images/angry-panda.gif";
|
||||
|
||||
const Custom404 = () => (
|
||||
<>
|
||||
<NextSeo title="Page Not Found" noindex={true} nofollow={true} />
|
||||
|
||||
<div>
|
||||
<Image src={angryPandaGif} width="435" height="300" alt="Panda takes out anger on innocent computer." />
|
||||
|
||||
<h2>404s Make Panda Angry</h2>
|
||||
|
||||
<Link href="/">
|
||||
<a>Maybe it's wise to get out of here and go home...?</a>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
<style jsx>{`
|
||||
div {
|
||||
padding: 2em 0;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
}
|
||||
`}</style>
|
||||
</>
|
||||
);
|
||||
|
||||
export default Custom404;
|
@@ -1,7 +1,7 @@
|
||||
import { NextSeo } from "next-seo";
|
||||
import Content from "../components/Content";
|
||||
import PageTitle from "../components/page/PageTitle";
|
||||
import Video from "../components/embeds/Video";
|
||||
import Video from "../components/media/Video";
|
||||
import { TapeIcon } from "../components/icons";
|
||||
|
||||
import thumbnail from "../public/static/images/birthday/thumb.png";
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { NextSeo } from "next-seo";
|
||||
import Content from "../components/Content";
|
||||
import PageTitle from "../components/page/PageTitle";
|
||||
import Video from "../components/embeds/Video";
|
||||
import Video from "../components/media/Video";
|
||||
|
||||
import thumbnail from "../public/static/images/hillary/thumb.png";
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { NextSeo } from "next-seo";
|
||||
import Content from "../components/Content";
|
||||
import PageTitle from "../components/page/PageTitle";
|
||||
import Video from "../components/embeds/Video";
|
||||
import Video from "../components/media/Video";
|
||||
|
||||
import thumbnail from "../public/static/images/leo/thumb.png";
|
||||
|
||||
|
@@ -6,8 +6,7 @@ import { escape } from "html-escaper";
|
||||
import { getMDXComponent } from "mdx-bundler/client";
|
||||
import Content from "../../components/Content";
|
||||
import Meta from "../../components/notes/Meta";
|
||||
import CustomLink from "../../components/embeds/Link";
|
||||
import CustomCode from "../../components/embeds/Code";
|
||||
import CustomCode from "../../components/media/Code";
|
||||
import { getNote, getNoteSlugs } from "../../lib/parse-notes";
|
||||
import * as config from "../../lib/config";
|
||||
import type { GetStaticProps, GetStaticPaths } from "next";
|
||||
@@ -16,11 +15,6 @@ import type { NoteType } from "../../types";
|
||||
const Comments = dynamic(() => import("../../components/notes/Comments"), { ssr: false });
|
||||
|
||||
const Note = ({ frontMatter, mdxSource }: NoteType) => {
|
||||
const customComponents = {
|
||||
a: CustomLink,
|
||||
code: CustomCode,
|
||||
};
|
||||
|
||||
const MDXComponent = useMemo(() => getMDXComponent(mdxSource, { process }), [mdxSource]);
|
||||
|
||||
return (
|
||||
@@ -73,8 +67,7 @@ const Note = ({ frontMatter, mdxSource }: NoteType) => {
|
||||
|
||||
<Meta {...frontMatter} />
|
||||
<Content>
|
||||
{/* @ts-ignore */}
|
||||
<MDXComponent components={customComponents} />
|
||||
<MDXComponent components={{ code: CustomCode }} />
|
||||
</Content>
|
||||
{frontMatter.noComments !== true && <Comments slug={frontMatter.slug} />}
|
||||
</>
|
||||
|
Reference in New Issue
Block a user