blob: 03089e497782b75bde4358e1c721f0cf52116d62 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
import { createContext, useContext } from "react";
import type { ClientConfig } from "@karakeep/shared/config";
export const ClientConfigCtx = createContext<ClientConfig>({
publicUrl: "",
publicApiUrl: "",
demoMode: undefined,
auth: {
disableSignups: false,
disablePasswordAuth: false,
},
inference: {
isConfigured: false,
inferredTagLang: "english",
},
serverVersion: undefined,
disableNewReleaseCheck: true,
});
export function useClientConfig() {
return useContext(ClientConfigCtx);
}
|