From 9aaf69e1dab028b69ca3c872c4745d2bfe5547a1 Mon Sep 17 00:00:00 2001 From: Rory Bourdon Date: Wed, 2 Aug 2023 20:42:26 -0400 Subject: [PATCH 1/3] Use next/font --- components/layout.js | 3 ++- pages/_app.js | 7 ++++--- pages/_document.js | 13 +------------ 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/components/layout.js b/components/layout.js index cf72325..9fd5012 100644 --- a/components/layout.js +++ b/components/layout.js @@ -2,7 +2,7 @@ import { ThemeContext } from "styled-components"; import { motion } from "framer-motion"; import { useContext } from "react"; -function Layout({ children }) { +function Layout({ children, className }) { const theme = useContext(ThemeContext); return ( @@ -12,6 +12,7 @@ function Layout({ children }) { overflow: "scroll", width: "100%", }} + className={className} > {children} diff --git a/pages/_app.js b/pages/_app.js index 9fb23ac..16c6927 100644 --- a/pages/_app.js +++ b/pages/_app.js @@ -3,6 +3,7 @@ import { createGlobalStyle } from "styled-components"; import { ThemeControlProvider } from "@/lib/Context/ThemeContext"; import Layout from "@/components/layout"; import Head from "next/head"; +import { Raleway } from "next/font/google"; const GlobalStyle = createGlobalStyle` html { @@ -33,7 +34,6 @@ html { font-size: 1rem; font-weight: 200; font-style: normal; - font-family: 'Raleway', sans-serif; color: hsla(0,0%,28.63%,1); min-height: 100vh; } @@ -102,6 +102,8 @@ function handleExitComplete() { } } +const raleway = Raleway({ subsets: ["latin"] }); + function MyApp({ Component, pageProps, router }) { return ( <> @@ -110,14 +112,13 @@ function MyApp({ Component, pageProps, router }) { - - + handleExitComplete()} diff --git a/pages/_document.js b/pages/_document.js index 5669654..56465ba 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -26,18 +26,7 @@ export default class MyDocument extends Document { render() { return ( - - - - - +