Implement translations with useContext in React +Add events to allow changing the language in the app +Refactor AppEvents +Redesign vertical bars in elements
26 lines
786 B
TypeScript
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);
|