From 717eee7d0a6b5bba9f9e50f48b1c57d318cad4ac Mon Sep 17 00:00:00 2001 From: Defectink Date: Wed, 23 Mar 2022 17:15:02 +0800 Subject: [PATCH] Add footer * modify mdx layout --- components/Footer.tsx | 18 ++++++++++++++++++ layouts/MDXLayout.tsx | 15 +++++++++++---- layouts/MainLayout.tsx | 7 ++++++- pages/index.tsx | 8 +++++--- pages/p/first-post.mdx | 2 ++ 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 components/Footer.tsx diff --git a/components/Footer.tsx b/components/Footer.tsx new file mode 100644 index 0000000..6c9c2ed --- /dev/null +++ b/components/Footer.tsx @@ -0,0 +1,18 @@ +import { FC } from 'react'; + +const nowDay = new Date().getFullYear(); + +const Footer: FC = () => { + return ( + <> + + + ); +}; + +export default Footer; diff --git a/layouts/MDXLayout.tsx b/layouts/MDXLayout.tsx index 02e5346..608d7b2 100644 --- a/layouts/MDXLayout.tsx +++ b/layouts/MDXLayout.tsx @@ -1,12 +1,19 @@ import { FC } from 'react'; -import MainLayout from 'layouts/MainLayout'; +import dynamic from 'next/dynamic'; -const MDXLayout: FC = ({ children }) => { +const Footer = dynamic(() => import('components/Footer')); +const HeadBar = dynamic(() => import('components/NavBar')); + +const MainLayout: FC = ({ children }) => { return ( <> - {children} + + +
{children}
+ +