Added 'cloud storage' functionality
This commit is contained in:
17
FastNotes/hooks/use-auth-context.tsx
Normal file
17
FastNotes/hooks/use-auth-context.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { createContext, useContext } from 'react'
|
||||
|
||||
export type AuthData = {
|
||||
claims?: Record<string, any> | null
|
||||
profile?: any | null
|
||||
isLoading: boolean
|
||||
isLoggedIn: boolean
|
||||
}
|
||||
|
||||
export const AuthContext = createContext<AuthData>({
|
||||
claims: undefined,
|
||||
profile: undefined,
|
||||
isLoading: true,
|
||||
isLoggedIn: false,
|
||||
})
|
||||
|
||||
export const useAuthContext = () => useContext(AuthContext)
|
||||
Reference in New Issue
Block a user