Auto config fonts

This commit is contained in:
n4ze3m
2024-04-27 23:32:47 +05:30
parent 0173a7fdbb
commit ca1a6e9b1a
7 changed files with 40 additions and 15 deletions

View File

@@ -11,13 +11,16 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
function IndexOption() {
const { mode } = useDarkMode()
const { t } = useTranslation()
const { t, i18n } = useTranslation()
return (
<MemoryRouter>
<ConfigProvider
theme={{
algorithm:
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
token: {
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
}
}}
renderEmpty={() => (
<Empty

View File

@@ -11,14 +11,17 @@ import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
function IndexSidepanel() {
const { mode } = useDarkMode()
const { t } = useTranslation()
const { t, i18n } = useTranslation()
return (
<MemoryRouter>
<ConfigProvider
theme={{
algorithm:
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
token: {
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
}
}}
renderEmpty={() => (
<Empty