import { createContext } from 'react'
import RouterSetup from './RouterSetup'
import { useSelector } from 'react-redux'
import type { StoreType } from './stores'
import Loading from './components/Loading'

export default function App() {
  const userStore = useSelector((store: StoreType) => store.user)

  return (
    <>
      {
        userStore.loading ? <Loading />
          : <RouterSetup />
      }
    </>
  )
}
