feat: ingredient product

This commit is contained in:
ferdiansyah783
2025-08-12 21:29:24 +07:00
parent c3780af341
commit f3dfad4cb3
36 changed files with 1731 additions and 465 deletions
+3 -2
View File
@@ -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(() => {