mirror of
https://github.com/docmost/docmost.git
synced 2025-11-12 17:42:36 +10:00
collaboration module cleanup
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
const useCollaborationURL = (): string => {
|
||||
const PATH = "/collaboration";
|
||||
const PATH = "/collab";
|
||||
|
||||
// TODO: revisit
|
||||
/*
|
||||
|
||||
@ -44,9 +44,10 @@ export default function PageEditor({
|
||||
|
||||
const [isLocalSynced, setLocalSynced] = useState(false);
|
||||
const [isRemoteSynced, setRemoteSynced] = useState(false);
|
||||
const documentName = `page.${pageId}`;
|
||||
|
||||
const localProvider = useMemo(() => {
|
||||
const provider = new IndexeddbPersistence(pageId, ydoc);
|
||||
const provider = new IndexeddbPersistence(documentName, ydoc);
|
||||
|
||||
provider.on("synced", () => {
|
||||
setLocalSynced(true);
|
||||
@ -57,7 +58,7 @@ export default function PageEditor({
|
||||
|
||||
const remoteProvider = useMemo(() => {
|
||||
const provider = new HocuspocusProvider({
|
||||
name: pageId,
|
||||
name: documentName,
|
||||
url: collaborationURL,
|
||||
document: ydoc,
|
||||
token: token?.accessToken,
|
||||
|
||||
Reference in New Issue
Block a user