CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/frontend/app-framework/syncdb/syncdb-context.ts
Views: 687
1
import { createContext, useContext } from "react";
2
import { SyncDB } from "@cocalc/sync/editor/db";
3
4
interface Context {
5
syncdb: SyncDB | null;
6
}
7
8
export const SyncdbContext = createContext<Context>({ syncdb: null });
9
10
export function useSyncdbContext() {
11
return useContext(SyncdbContext);
12
}
13
14