aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/lib/clientConfig.tsx
blob: 10ca10104cbcbd367d12ef5abe9cfbb74c767c1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { createContext, useContext } from "react";

import type { ClientConfig } from "@hoarder/shared/config";

export const ClientConfigCtx = createContext<ClientConfig>({
  demoMode: false,
  auth: {
    disableSignups: false,
  },
});

export function useClientConfig() {
  return useContext(ClientConfigCtx);
}