|
|
@@ -1,5 +1,7 @@
|
|
|
import { PropsWithChildren } from 'react'
|
|
|
import { useLaunch } from '@tarojs/taro'
|
|
|
+import { QueryClientProvider } from '@tanstack/react-query'
|
|
|
+import { AuthProvider, queryClient } from './utils/auth'
|
|
|
|
|
|
import './app.css'
|
|
|
|
|
|
@@ -9,9 +11,11 @@ function App({ children }: PropsWithChildren<any>) {
|
|
|
})
|
|
|
|
|
|
// children 是将要会渲染的页面
|
|
|
- return children
|
|
|
+ return (
|
|
|
+ <QueryClientProvider client={queryClient}>
|
|
|
+ <AuthProvider>{children}</AuthProvider>
|
|
|
+ </QueryClientProvider>
|
|
|
+ )
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
export default App
|