Skip to content

Commit

Permalink
Merge pull request #2129 from Agenta-AI/fix/application-font-family-i…
Browse files Browse the repository at this point in the history
…ssue

fix(frontend): font style issue
  • Loading branch information
mmabrouk authored Oct 21, 2024
2 parents f501b02 + 37a7d8c commit 5cbb6a8
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 102 deletions.
13 changes: 12 additions & 1 deletion agenta-web/src/components/Layout/ThemeContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import {ConfigProvider, theme} from "antd"
import {PropsWithChildren, createContext, useState, useContext, useEffect} from "react"
import {useLocalStorage, useUpdateEffect} from "usehooks-ts"
import antdTokens from "@/styles/tokens/antd-themeConfig.json"
import {Inter} from "next/font/google"

const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
})

export enum ThemeMode {
Light = "light",
Expand Down Expand Up @@ -68,7 +74,12 @@ const ThemeContextProvider: React.FC<PropsWithChildren> = ({children}) => {
<ConfigProvider
theme={{
algorithm: theme.defaultAlgorithm,
...antdTokens,
token: {
fontFamily: inter.style.fontFamily,
fontFamilyCode: inter.style.fontFamily,
...antdTokens.token,
...antdTokens.components,
},
}}
>
{children}
Expand Down
Loading

0 comments on commit 5cbb6a8

Please sign in to comment.