forked from VinokurovVE/tests
Refactored store
This commit is contained in:
@ -8,7 +8,7 @@ import MainLayout from "./layouts/MainLayout"
|
||||
import SignIn from "./pages/auth/SignIn"
|
||||
import ApiTest from "./pages/ApiTest"
|
||||
import SignUp from "./pages/auth/SignUp"
|
||||
import { useAuthStore } from "./store/auth"
|
||||
import { initAuth, useAuthStore } from "./store/auth"
|
||||
import { useEffect, useState } from "react"
|
||||
import { CircularProgress } from "@mui/material"
|
||||
|
||||
@ -17,7 +17,7 @@ function App() {
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
|
||||
useEffect(() => {
|
||||
auth.initializeAuth()
|
||||
initAuth()
|
||||
}, [])
|
||||
|
||||
// Once auth is there, set loading to false and render the app
|
||||
|
Reference in New Issue
Block a user