Implement the mobile dashboard frontend, admin overview APIs, report archive export, and local dev proxy so the boss dashboard can run against real backend data while preserving MSW demos. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
645 B
TypeScript
27 lines
645 B
TypeScript
import { ConfigProvider } from 'antd-mobile'
|
|
import zhCN from 'antd-mobile/es/locales/zh-CN'
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
import type { ReactNode } from 'react'
|
|
|
|
const queryClient = new QueryClient({
|
|
defaultOptions: {
|
|
queries: {
|
|
staleTime: 60 * 1000,
|
|
retry: 1,
|
|
refetchOnWindowFocus: false,
|
|
},
|
|
},
|
|
})
|
|
|
|
type AppProvidersProps = {
|
|
children: ReactNode
|
|
}
|
|
|
|
export function AppProviders({ children }: AppProvidersProps) {
|
|
return (
|
|
<ConfigProvider locale={zhCN}>
|
|
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
|
|
</ConfigProvider>
|
|
)
|
|
}
|