mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 09:45:29 +00:00
24 lines
593 B
TypeScript
24 lines
593 B
TypeScript
import type React from 'react'
|
|
import {createContext} from 'react'
|
|
import type {InstanceConfig} from "../utils/api"
|
|
|
|
|
|
export type ConfigurationContextType = {
|
|
configuration: InstanceConfig | undefined
|
|
}
|
|
|
|
export const ConfigurationContext = createContext<ConfigurationContextType>({
|
|
configuration: undefined,
|
|
})
|
|
|
|
|
|
export type AuthContextType = {
|
|
isAuthenticated: boolean
|
|
setIsAuthenticated: React.Dispatch<React.SetStateAction<boolean>>
|
|
}
|
|
|
|
export const AuthenticatedContext = createContext<AuthContextType>({
|
|
isAuthenticated: false,
|
|
setIsAuthenticated: () => {
|
|
},
|
|
}) |