/
githubmirror
/
Open-Assistant
Обзор
Документация
Войти
/
githubmirror
/
Open-Assistant
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
website/src/hooks/env/BrowserEnv.ts
16 строк
492 B
Yannic Kilcher
apparently, prod ignores redirects or process env
25 ноя 2023, 18:46
25 ноя 2023, 18:46
ca7dc79
Код
Авторство
О чём код?
import { createContext, useContext } from "react"; export interface BrowserConfig { BYE: boolean; ENABLE_CHAT: boolean; ENABLE_DRAFTS_WITH_PLUGINS: boolean; NUM_GENERATED_DRAFTS: number; ENABLE_EMAIL_SIGNIN: boolean; ENABLE_EMAIL_SIGNIN_CAPTCHA: boolean; CLOUDFLARE_CAPTCHA_SITE_KEY: string; CURRENT_ANNOUNCEMENT: string; } export const BrowserConfigContext = createContext<BrowserConfig>({} as any); export const useBrowserConfig = () => useContext(BrowserConfigContext);