From 121bbf4b52906f109b37feb39b5e548e893facab Mon Sep 17 00:00:00 2001 From: Elijah Date: Sun, 24 May 2026 11:54:17 -0700 Subject: [PATCH] Fix react hooks bug --- frontend/src/components/OnlyOfficeEditor.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/frontend/src/components/OnlyOfficeEditor.tsx b/frontend/src/components/OnlyOfficeEditor.tsx index 122003b..08933d3 100644 --- a/frontend/src/components/OnlyOfficeEditor.tsx +++ b/frontend/src/components/OnlyOfficeEditor.tsx @@ -101,21 +101,6 @@ export default function OnlyOfficeEditor({ file, type, onClose }: OnlyOfficeEdit const docServerUrl = 'https://office.elijahkuntz.com/'; - // Add a diagnostic check to ensure the browser can reach the OnlyOffice server - useEffect(() => { - if (!config) return; - - // We try to fetch the api.js script to see if it's blocked by DNS/SSL/Brave Shields - const scriptUrl = `${docServerUrl}web-apps/apps/api/documents/api.js`; - fetch(scriptUrl, { mode: 'no-cors' }) - .then(() => { - console.log("OnlyOffice API script is reachable."); - }) - .catch((err) => { - setLoadError(`Browser cannot reach ${scriptUrl}. This is usually caused by: 1) Missing DNS record for office.elijahkuntz.com, 2) Invalid SSL Certificate, or 3) Browser blocking the connection (Brave Shields). Please check your browser's Developer Console (F12) for the exact network error.`); - }); - }, [config]); - const onDocumentReady = function (event: any) { console.log("Document is loaded"); };