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

custom <Link /> wrapper around next/link

This commit is contained in:
2022-01-30 10:33:40 -05:00
parent 2a29d713bb
commit 9f34cec930
35 changed files with 578 additions and 1009 deletions

View File

@ -1,17 +1,18 @@
import Head from "next/head";
import { useTheme } from "next-themes";
import classNames from "classnames";
import Header from "../Header/Header";
import Footer from "../Footer/Footer";
import { themeColors } from "../../lib/config";
import type { ReactNode } from "react";
import type { PropsWithChildren } from "react";
import styles from "./Layout.module.css";
type Props = {
children: ReactNode;
};
type Props = PropsWithChildren<{
className?: string;
}>;
const Layout = ({ children }: Props) => {
const Layout = ({ className, children }: Props) => {
const { resolvedTheme } = useTheme();
return (
@ -23,7 +24,7 @@ const Layout = ({ children }: Props) => {
)}
<Header />
<main className={styles.main}>
<main className={classNames(styles.main, className)}>
<div className={styles.container}>{children}</div>
</main>
<Footer />