feat: ingredient product
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
|
||||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
import Loading from '../components/layout/shared/Loading'
|
||||
import { User } from '../types/services/user'
|
||||
|
||||
type AuthContextType = {
|
||||
isAuthenticated: boolean
|
||||
token: string | null
|
||||
currentUser: any | null
|
||||
currentUser: User | null
|
||||
}
|
||||
|
||||
const AuthContext = createContext<AuthContextType>({
|
||||
@@ -17,7 +18,7 @@ const AuthContext = createContext<AuthContextType>({
|
||||
|
||||
export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
const [token, setToken] = useState<string | null>(null)
|
||||
const [currentUser, setCurrentUser] = useState<any | null>(null)
|
||||
const [currentUser, setCurrentUser] = useState<User | null>(null)
|
||||
const [isInitialized, setIsInitialized] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user