Skip to content

Commit

Permalink
feat: use google/font instead of geist font package
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0225SUN committed Dec 18, 2024
1 parent b65842b commit f47cc18
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
3 changes: 1 addition & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"rules": {
"recommended": true,
"suspicious": {
"noDebugger": "off",
"noConsoleLog": "info"
"noDebugger": "off"
},
"style": {},
"a11y": {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@trpc/server": "^11.0.0-rc.446",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"geist": "^1.3.0",
"lefthook": "^1.9.3",
"lucide-react": "^0.468.0",
"next": "^15.1.0",
Expand Down
16 changes: 11 additions & 5 deletions src/app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@ import { notFound } from 'next/navigation'
import { ThemeProvider } from '~/components/theme/provider'
import { type Locale, routing } from '~/i18n/routing'
import '~/styles/globals.css'
import { Geist } from 'next/font/google'
import { cn } from '~/lib/utils'
import { TRPCReactProvider } from '~/trpc/react'

export const metadata: Metadata = {
title: 'Create T3 App',
description: 'Generated by create-t3-app',
title: 'Next Starter',
description: 'Next.js starter',
icons: [{ rel: 'icon', url: '/favicon.ico' }],
}

type Params = Promise<{ locale: string }>
const geist = Geist({
subsets: ['latin'],
variable: '--font-geist',
display: 'swap',
})

export default async function LocaleLayout({
children,
params,
}: {
children: React.ReactNode
params: Params
params: Promise<{ locale: string }>
}) {
const { locale } = await params

Expand All @@ -39,7 +45,7 @@ export default async function LocaleLayout({
lang={locale}
suppressHydrationWarning
>
<body>
<body className={cn(geist.variable, geist.className)}>
<NextIntlClientProvider messages={messages}>
<TRPCReactProvider>
<ThemeProvider
Expand Down
4 changes: 2 additions & 2 deletions src/components/store-demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ export function StoreDemo() {
const isClient = useIsClient()

if (!isClient) {
return null
return <div className='h-10' />
}

return (
<div className='flex h-5 items-center gap-4'>
<div className='flex h-10 items-center gap-4'>
<div>{bears}</div>
<Button onClick={addABear}>Add a Bear</Button>
</div>
Expand Down

0 comments on commit f47cc18

Please sign in to comment.