2023-04-09 23:28:52 +05:30
|
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
|
|
|
|
import { MemoryRouter } from "react-router-dom"
|
|
|
|
|
const queryClient = new QueryClient()
|
2024-03-24 17:07:21 +05:30
|
|
|
import { ConfigProvider, Empty, theme } from "antd"
|
2024-02-03 11:29:47 +05:30
|
|
|
import { StyleProvider } from "@ant-design/cssinjs"
|
2024-03-23 14:44:05 +05:30
|
|
|
import { useDarkMode } from "~/hooks/useDarkmode"
|
|
|
|
|
import { OptionRouting } from "~/routes"
|
2024-03-24 12:43:43 +05:30
|
|
|
import "~/i18n"
|
2024-03-24 17:07:21 +05:30
|
|
|
import { useTranslation } from "react-i18next"
|
2024-03-31 00:36:12 +05:30
|
|
|
import { PageAssistProvider } from "@/components/Common/PageAssistProvider"
|
2024-03-24 12:43:43 +05:30
|
|
|
|
2024-02-01 13:40:44 +05:30
|
|
|
function IndexOption() {
|
2024-02-03 11:29:47 +05:30
|
|
|
const { mode } = useDarkMode()
|
2024-04-27 23:32:47 +05:30
|
|
|
const { t, i18n } = useTranslation()
|
2023-04-09 23:28:52 +05:30
|
|
|
return (
|
|
|
|
|
<MemoryRouter>
|
2024-02-03 11:29:47 +05:30
|
|
|
<ConfigProvider
|
|
|
|
|
theme={{
|
|
|
|
|
algorithm:
|
2024-04-27 23:32:47 +05:30
|
|
|
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm,
|
|
|
|
|
token: {
|
|
|
|
|
fontFamily: i18n.language === "ru" ? "Onest" : "Inter"
|
|
|
|
|
}
|
2024-03-24 17:07:21 +05:30
|
|
|
}}
|
|
|
|
|
renderEmpty={() => (
|
|
|
|
|
<Empty
|
|
|
|
|
imageStyle={{
|
|
|
|
|
height: 60
|
|
|
|
|
}}
|
|
|
|
|
description={t("common:noData")}
|
|
|
|
|
/>
|
2024-03-31 00:36:12 +05:30
|
|
|
)}>
|
2024-02-03 11:29:47 +05:30
|
|
|
<StyleProvider hashPriority="high">
|
|
|
|
|
<QueryClientProvider client={queryClient}>
|
2024-03-31 00:36:12 +05:30
|
|
|
<PageAssistProvider>
|
|
|
|
|
<OptionRouting />
|
|
|
|
|
</PageAssistProvider>
|
2024-02-03 11:29:47 +05:30
|
|
|
</QueryClientProvider>
|
|
|
|
|
</StyleProvider>
|
|
|
|
|
</ConfigProvider>
|
2023-04-09 23:28:52 +05:30
|
|
|
</MemoryRouter>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-01 13:40:44 +05:30
|
|
|
export default IndexOption
|