feat: remove unused admin dashboard components and icons for cleanup

This commit is contained in:
Ardeman
2025-03-07 17:31:30 +08:00
parent c91fe48eb9
commit a7bae3ea43
14 changed files with 5 additions and 465 deletions
-41
View File
@@ -1,41 +0,0 @@
import {
createContext,
useState,
useContext,
type PropsWithChildren,
type SetStateAction,
type Dispatch,
} from 'react'
type AdminProfile = {
name: string
}
type AdminContextProperties = {
adminProfile: AdminProfile
setAdminProfile: Dispatch<SetStateAction<AdminProfile>>
}
const AdminContext = createContext<AdminContextProperties | undefined>(
undefined,
)
export const AdminProvider = ({ children }: PropsWithChildren) => {
const [adminProfile, setAdminProfile] = useState<AdminProfile>({
name: 'Admin',
})
return (
<AdminContext.Provider value={{ adminProfile, setAdminProfile }}>
{children}
</AdminContext.Provider>
)
}
export const useAdminContext = (): AdminContextProperties => {
const context = useContext(AdminContext)
if (!context) {
throw new Error('useAdminContext must be used within a AdminProvider')
}
return context
}