svg-layout-designer-react/src/main.tsx
Eric Nguyen 505813d530 Merged PR 225: Implement translations
Implement translations with useContext in React
+Add events to allow changing the language in the app
+Refactor AppEvents
+Redesign vertical bars in elements
2022-11-04 10:58:06 +00:00

26 lines
786 B
TypeScript

import React from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './Components/App/App';
import { LanguageProvider } from './Components/LanguageProvider/LanguageProvider';
import './index.scss';
function RenderRoot(root: Element | Document): void {
ReactDOM.createRoot(root.querySelector('#root') as HTMLDivElement).render(
<React.StrictMode>
<LanguageProvider>
<App root={root}/>
</LanguageProvider>
</React.StrictMode>
);
}
// Specific for Modeler apps
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace SVGLayoutDesigner {
// eslint-disable-next-line @typescript-eslint/naming-convention
export const Render = RenderRoot;
}
(window as any).SVGLayoutDesigner = SVGLayoutDesigner;
RenderRoot(document);