feat: reference geist from google fonts (#876)

This commit is contained in:
Jeremy 2025-03-18 13:57:06 -07:00 committed by GitHub
parent d26e0d9ac4
commit 1a8cd993f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 73 additions and 75 deletions

View file

@ -1,6 +1,6 @@
import type { Metadata } from 'next';
import { Toaster } from 'sonner';
import type { Metadata } from 'next';
import { Geist, Geist_Mono } from 'next/font/google';
import { ThemeProvider } from '@/components/theme-provider';
import './globals.css';
@ -15,6 +15,18 @@ export const viewport = {
maximumScale: 1, // Disable auto-zoom on mobile Safari
};
const geist = Geist({
subsets: ['latin'],
display: 'swap',
variable: '--font-geist',
});
const geistMono = Geist_Mono({
subsets: ['latin'],
display: 'swap',
variable: '--font-geist-mono',
});
const LIGHT_THEME_COLOR = 'hsl(0 0% 100%)';
const DARK_THEME_COLOR = 'hsl(240deg 10% 3.92%)';
const THEME_COLOR_SCRIPT = `\
@ -48,6 +60,7 @@ export default async function RootLayout({
// prop is necessary to avoid the React hydration mismatch warning.
// https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app
suppressHydrationWarning
className={`${geist.variable} ${geistMono.variable}`}
>
<head>
<script
@ -56,7 +69,7 @@ export default async function RootLayout({
}}
/>
</head>
<body className="">
<body className="antialiased">
<ThemeProvider
attribute="class"
defaultTheme="system"