/** * This file is the entry point for the React app, it sets up the root * element and renders the App component to the DOM. * * It is included in `src/index.html`. */ /** biome-ignore-all lint/style/noNonNullAssertion: <>{children}; const elem = document.getElementById("root")!; const app = ( { if (!e.codeInfo) return; const url = VITE_PUBLIC_URL; fetch(`${url}/__open-in-editor`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ relativePath: e.codeInfo.relativePath, lineNumber: e.codeInfo.lineNumber, columnNumber: e.codeInfo.columnNumber, }), }); }} > ); if (import.meta.hot) { // With hot module reloading, `import.meta.hot.data` is persisted. const root = (import.meta.hot.data.root ??= createRoot(elem)); root.render(app); } else { // The hot module reloading API is not available in production. createRoot(elem).render(app); }