1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 21:26:37 -04:00

next-mdx-remote v4 (#737)

This commit is contained in:
2022-01-18 09:25:09 -05:00
committed by GitHub
parent 2ef5d06c38
commit a406010bd2
110 changed files with 1009 additions and 1490 deletions

View File

@ -0,0 +1,34 @@
import Head from "next/head";
import { useTheme } from "next-themes";
import Header from "../Header/Header";
import Footer from "../Footer/Footer";
import { themeColors } from "../../lib/config";
import type { ReactNode } from "react";
import styles from "./Layout.module.css";
type Props = {
children: ReactNode;
};
const Layout = ({ children }: Props) => {
const { resolvedTheme } = useTheme();
return (
<>
{resolvedTheme && (
<Head>
<meta name="theme-color" content={themeColors[resolvedTheme]} />
</Head>
)}
<Header />
<main className={styles.main}>
<div className={styles.container}>{children}</div>
</main>
<Footer />
</>
);
};
export default Layout;