Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/client/context.ts
1503 views
1
// in the frontend, webapp_client is set. This is a way for the frontend to get that but nextjs doesn't,
2
// but in the same code.
3
4
import { createContext, useContext } from "react";
5
6
export interface ClientState {
7
client?;
8
}
9
10
export const ClientContext = createContext<ClientState>({});
11
12
export default function useClientContext() {
13
return useContext(ClientContext);
14
}
15
16