1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 06:01:17 -04:00

refactor component imports/exports

This commit is contained in:
2022-03-16 11:22:56 -04:00
parent 83bb83804f
commit 4ea5b15db0
71 changed files with 224 additions and 139 deletions

View File

@@ -1,24 +1,24 @@
import dynamic from "next/dynamic";
// Bundle these components by default:
export { default as Image } from "../../components/Image/Image";
export { default as Figure } from "../../components/Figure/Figure";
export { default as Image } from "../../components/Image";
export { default as Figure } from "../../components/Figure";
// These (mostly very small) components are direct replacements for HTML tags generated by remark:
export { default as a } from "../../components/Link/Link";
export { default as code } from "../../components/CodeBlock/CodeBlock";
export { default as blockquote } from "../../components/Blockquote/Blockquote";
export { default as hr } from "../../components/HorizontalRule/HorizontalRule";
export { H1 as h1, H2 as h2, H3 as h3, H4 as h4, H5 as h5, H6 as h6 } from "../../components/Heading/Heading";
export { UnorderedList as ul, OrderedList as ol, ListItem as li } from "../../components/List/List";
export { default as a } from "../../components/Link";
export { default as code } from "../../components/CodeBlock";
export { default as blockquote } from "../../components/Blockquote";
export { default as hr } from "../../components/HorizontalRule";
export { H1 as h1, H2 as h2, H3 as h3, H4 as h4, H5 as h5, H6 as h6 } from "../../components/Heading";
export { UnorderedList as ul, OrderedList as ol, ListItem as li } from "../../components/List";
// ...and these components are technically passed into all posts, but next/dynamic ensures they're loaded only
// when they're referenced in the individual mdx files.
export const IFrame = dynamic(() => import("../../components/IFrame/IFrame"));
export const Video = dynamic(() => import("../../components/Video/Video"));
export const YouTube = dynamic(() => import("../../components/YouTubeEmbed/YouTubeEmbed"));
export const Tweet = dynamic(() => import("../../components/TweetEmbed/TweetEmbed"));
export const Gist = dynamic(() => import("../../components/GistEmbed/GistEmbed"));
export const IFrame = dynamic(() => import("../../components/IFrame"));
export const Video = dynamic(() => import("../../components/Video"));
export const YouTube = dynamic(() => import("../../components/YouTubeEmbed"));
export const Tweet = dynamic(() => import("../../components/TweetEmbed"));
export const Gist = dynamic(() => import("../../components/GistEmbed"));
// One-offs for specific posts:
export const OctocatLink = dynamic(() => import("../../components/OctocatLink/OctocatLink"));
export const OctocatLink = dynamic(() => import("../../components/OctocatLink"));