mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 02:25:01 +08:00
remove unused code
This commit is contained in:
@@ -99,24 +99,6 @@ export default function PageEditor({
|
|||||||
const localProvider = providersRef.current?.local;
|
const localProvider = providersRef.current?.local;
|
||||||
const remoteProvider = providersRef.current?.remote;
|
const remoteProvider = providersRef.current?.remote;
|
||||||
|
|
||||||
// Track when collaborative provider is ready and synced
|
|
||||||
const [collabReady, setCollabReady] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (
|
|
||||||
remoteProvider?.configuration.websocketProvider.status ===
|
|
||||||
WebSocketStatus.Connected &&
|
|
||||||
isLocalSynced &&
|
|
||||||
isRemoteSynced
|
|
||||||
) {
|
|
||||||
setCollabReady(true);
|
|
||||||
}
|
|
||||||
}, [
|
|
||||||
remoteProvider?.configuration.websocketProvider.status,
|
|
||||||
isLocalSynced,
|
|
||||||
isRemoteSynced,
|
|
||||||
]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!providersRef.current) {
|
if (!providersRef.current) {
|
||||||
const local = new IndexeddbPersistence(documentName, ydoc);
|
const local = new IndexeddbPersistence(documentName, ydoc);
|
||||||
|
|||||||
Reference in New Issue
Block a user