2023-04-09 23:28:52 +05:30
|
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
|
|
|
|
import { MemoryRouter } from "react-router-dom"
|
2024-02-01 13:40:44 +05:30
|
|
|
import { ToastContainer } from "react-toastify"
|
|
|
|
|
import "react-toastify/dist/ReactToastify.css"
|
2023-04-09 23:28:52 +05:30
|
|
|
const queryClient = new QueryClient()
|
2024-02-01 13:40:44 +05:30
|
|
|
import "./css/tailwind.css"
|
2024-02-03 11:29:47 +05:30
|
|
|
import { ConfigProvider, theme } from "antd"
|
|
|
|
|
import { StyleProvider } from "@ant-design/cssinjs"
|
|
|
|
|
import { useDarkMode } from "~hooks/useDarkmode"
|
2024-02-07 00:11:07 +05:30
|
|
|
import { OptionRouting } from "~routes"
|
2024-02-01 13:40:44 +05:30
|
|
|
function IndexOption() {
|
2024-02-03 11:29:47 +05:30
|
|
|
const { mode } = useDarkMode()
|
2023-04-09 23:28:52 +05:30
|
|
|
return (
|
|
|
|
|
<MemoryRouter>
|
2024-02-03 11:29:47 +05:30
|
|
|
<ConfigProvider
|
|
|
|
|
theme={{
|
|
|
|
|
algorithm:
|
|
|
|
|
mode === "dark" ? theme.darkAlgorithm : theme.defaultAlgorithm
|
|
|
|
|
}}>
|
|
|
|
|
<StyleProvider hashPriority="high">
|
|
|
|
|
<QueryClientProvider client={queryClient}>
|
2024-02-07 00:11:07 +05:30
|
|
|
<OptionRouting />
|
2024-02-03 11:29:47 +05:30
|
|
|
<ToastContainer />
|
|
|
|
|
</QueryClientProvider>
|
|
|
|
|
</StyleProvider>
|
|
|
|
|
</ConfigProvider>
|
2023-04-09 23:28:52 +05:30
|
|
|
</MemoryRouter>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-01 13:40:44 +05:30
|
|
|
export default IndexOption
|