Skip to content

Commit cb90bd1

Browse files
committed
refactor: change localFont method with direct use of font face
1 parent bd150b1 commit cb90bd1

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/app/globals.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
body {
7070
color: var(--foreground);
7171
background: var(--background);
72+
font-family: "DanaVariableFont";
7273
}
7374

7475
@layer base {

src/app/layout.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1+
import "../../public/fonts/dana/dana.css";
12
import "./globals.css";
23
import { ThemeProvider } from "@/components/contexts/theme-provider";
34
import type { Metadata } from "next";
4-
import localFont from "next/font/local";
55

66
export const metadata: Metadata = {
77
title: "فرانت چپتر | محلی صمیمی برای گفت و گو",
88
description: "Generated by create next app",
99
};
1010

11-
const danaVF = localFont({
12-
src: "../../public/fonts/dana/DanaVF.woff2",
13-
fallback: ["Tahoma", "sans-serif"],
14-
});
15-
1611
export default function RootLayout({
1712
children,
1813
}: Readonly<{
@@ -23,7 +18,7 @@ export default function RootLayout({
2318
lang="fa-IR"
2419
dir="rtl"
2520
style={{ colorScheme: "dark" }}
26-
className={`dark ${danaVF.className}`}
21+
className="dark"
2722
>
2823
<body className="bg-background antialiased">
2924
<ThemeProvider>{children}</ThemeProvider>

0 commit comments

Comments
 (0)