toi uu authen, add loading global

This commit is contained in:
2025-10-08 07:45:39 +07:00
parent 7645838eb8
commit 21e77456c9
11 changed files with 128 additions and 23 deletions

View File

@@ -1,9 +1,18 @@
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 (
<RouterSetup />
<>
{
userStore.loading ? <Loading />
: <RouterSetup />
}
</>
)
}