import { Suspense } from 'react'
import { RouterProvider } from 'react-router-dom'

import { AppProvider } from '@/app/providers/app-provider'
import { AppLoading } from '@/components/system/app-loading'
import { router } from '@/routes/router'

const App = () => (
  <AppProvider>
    <Suspense fallback={<AppLoading />}>
      <RouterProvider router={router} />
    </Suspense>
  </AppProvider>
)

export default App
