2025-12-08 18:18:33 +01:00
|
|
|
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 = {
|
2025-12-10 11:03:24 +01:00
|
|
|
isAuthenticated?: boolean
|
|
|
|
|
setIsAuthenticated: React.Dispatch<React.SetStateAction<boolean | undefined>>
|
2025-12-08 18:18:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const AuthenticatedContext = createContext<AuthContextType>({
|
2025-12-10 11:03:24 +01:00
|
|
|
isAuthenticated: undefined,
|
2025-12-08 18:18:33 +01:00
|
|
|
setIsAuthenticated: () => {
|
|
|
|
|
},
|
|
|
|
|
})
|