chore(refactor): remove SyncManager

This commit is contained in:
Paul Makles
2022-06-29 16:41:26 +01:00
parent 1fcb3cedc1
commit 45692999bf
5 changed files with 52 additions and 82 deletions

View File

@@ -6,7 +6,7 @@ import { useEffect, useState } from "preact/hooks";
import { Preloader, UIProvider } from "@revoltchat/ui";
import { hydrateState } from "../mobx/State";
import { state } from "../mobx/State";
import Binder from "../controllers/client/jsx/Binder";
import ModalRenderer from "../controllers/modals/ModalRenderer";
@@ -14,7 +14,6 @@ import Locale from "./Locale";
import Theme from "./Theme";
import { history } from "./history";
import Intermediate from "./intermediate/Intermediate";
import SyncManager from "./revoltjs/SyncManager";
const uiContext = {
Link,
@@ -31,7 +30,7 @@ export default function Context({ children }: { children: Children }) {
const [ready, setReady] = useState(false);
useEffect(() => {
hydrateState().then(() => setReady(true));
state.hydrate().then(() => setReady(true));
}, []);
if (!ready) return <Preloader type="spinner" />;
@@ -42,7 +41,6 @@ export default function Context({ children }: { children: Children }) {
<Locale>
<Intermediate>
{children}
<SyncManager />
<Binder />
</Intermediate>
<ModalRenderer />