Merge branch 'main' into feat/sources-in-react-widget

This commit is contained in:
Manish Madan
2025-02-17 15:41:34 +05:30
committed by GitHub
257 changed files with 14591 additions and 10233 deletions

View File

@@ -1,14 +1,8 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import { DocsGPTWidget } from './components/DocsGPTWidget';
if (typeof window !== 'undefined') {
const renderWidget = (elementId: string, props={}) => {
const root = createRoot(document.getElementById(elementId) as HTMLElement);
root.render(
<DocsGPTWidget {...props} />
);
};
(window as any).renderDocsGPTWidget = renderWidget;
}
export { DocsGPTWidget };
//development
import { createRoot } from "react-dom/client";
import { App } from "./App";
import React from "react";
const container = document.getElementById("app") as HTMLElement;
const root = createRoot(container)
root.render(<App />);