You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
679 B

/** @jsx jsx */
import { useEffect } from 'react';
import { Global, jsx } from '@emotion/core';
import { useTranslation } from 'react-i18next';
import Layout from './components/layout';
import { UIProvider } from './store/ui';
import globalStyles from './utils/styles/global';
import './i18n';
interface EditorProps {
lang?: string;
}
function JsonSchemaEditor({ lang }: EditorProps): JSX.Element {
const { i18n } = useTranslation();
useEffect(() => {
if (!lang) return;
i18n.changeLanguage(lang);
}, [i18n, lang]);
return (
<UIProvider>
<Global styles={globalStyles} />
<Layout />
</UIProvider>
);
}
export default JsonSchemaEditor;