import React from 'react';
import { Provider } from 'react-redux';
import configureStore from './store';
import FormModeler from './components/formModeler';
import Layout from './layout/Layout';
import LocaleProvider from './context/LocaleContext';
import Spinner from './components/common/Spinner';

export const store = configureStore();

const App = (): React.ReactElement => {
    return (
        <LocaleProvider>
            <Provider store={store}>
                <Spinner />
                <Layout>
                    <FormModeler />
                </Layout>
            </Provider>
        </LocaleProvider>
    );
};

export default App;
