Compare commits

...

1 Commits

Author SHA1 Message Date
Aaryan Khandelwal
dcc4d1411d chore: add health check call to the web client 2024-09-12 14:13:46 +05:30

View File

@@ -1,6 +1,7 @@
import { useCallback, useEffect, useMemo } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
import useSWR from "swr";
// document-editor
import {
CollaborativeDocumentEditorWithRef,
@@ -132,6 +133,14 @@ export const PageEditorBody: React.FC<Props> = observer((props) => {
[projectId, workspaceSlug]
);
useSWR(
"LIVE_SERVER_HEALTH_CHECK",
async () =>
await fetch(`${LIVE_URL}/health`, {
credentials: "include",
})
);
if (pageId === undefined) return <PageContentLoader />;
return (