app.tsx 639 B

1234567891011121314151617181920212223
  1. import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
  2. import '@/utils/headers-polyfill.js'
  3. import { PropsWithChildren } from 'react'
  4. import { useLaunch } from '@tarojs/taro'
  5. import { QueryClientProvider } from '@tanstack/react-query'
  6. import { AuthProvider, queryClient } from './utils/auth'
  7. import './app.css'
  8. function App({ children }: PropsWithChildren<any>) {
  9. useLaunch(() => {
  10. console.log('App launched.')
  11. })
  12. // children 是将要会渲染的页面
  13. return (
  14. <QueryClientProvider client={queryClient}>
  15. <AuthProvider>{children}</AuthProvider>
  16. </QueryClientProvider>
  17. )
  18. }
  19. export default App