mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-15 07:34:42 -04:00
Frontend config and Loader component (#12)
* Add FrontendConfig and Loader Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Merge more setup into the application loader Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Rename config files Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Remove blank line Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Fix url Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Make strings more specific Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Restructure store use Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * split methods and actions Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * extract code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * remove actions.ts Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * add reason and rename component Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * remove unused call Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Use redux store in api Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * activate email in backend config Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * add new line Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * reduce code Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Make error more specific Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Use expectedResponseCode Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> * Update src/redux/backend-config/types.ts Co-authored-by: Philip Molares <git@molar.es> * Update src/components/application-loader/application-loader.tsx Co-authored-by: Philip Molares <git@molar.es> * Update src/components/application-loader/application-loader.tsx Co-authored-by: Philip Molares <git@molar.es> * Update src/components/application-loader/application-loader.tsx Co-authored-by: Philip Molares <git@molar.es> * Use fragment Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Co-authored-by: Philip Molares <git@molar.es>
This commit is contained in:
parent
ef17c7acbb
commit
a490e1240b
36 changed files with 425 additions and 256 deletions
|
@ -2,27 +2,23 @@ import React from 'react'
|
|||
import ReactDOM from 'react-dom'
|
||||
import {BrowserRouter as Router} from 'react-router-dom'
|
||||
import * as serviceWorker from './service-worker';
|
||||
import {ApplicationStateStoreProvider} from "./redux/application-state-store-provider/application-state-store-provider";
|
||||
import {setUpI18n} from "./initializers/i18n";
|
||||
import {InitializeUserStateFromApi} from "./components/initialize/initialize-user-state-from-api";
|
||||
import {Landing} from "./components/landing/layout";
|
||||
import {setUpFontAwesome} from "./initializers/fontAwesome";
|
||||
import {InitializeConfigStateFromApi} from "./components/initialize/initalize-config-state-from-api";
|
||||
import {ApplicationLoader} from "./components/application-loader/application-loader";
|
||||
import {Provider} from "react-redux";
|
||||
import {store} from "./utils/store";
|
||||
import {setUp} from "./initializers";
|
||||
|
||||
setUpFontAwesome();
|
||||
setUpI18n().then(
|
||||
() => {
|
||||
ReactDOM.render(
|
||||
<ApplicationStateStoreProvider>
|
||||
<InitializeUserStateFromApi/>
|
||||
<InitializeConfigStateFromApi/>
|
||||
<Router>
|
||||
<Landing/>
|
||||
</Router>
|
||||
</ApplicationStateStoreProvider>
|
||||
, document.getElementById('root')
|
||||
)
|
||||
}
|
||||
const initTasks = setUp();
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<ApplicationLoader initTasks={initTasks}>
|
||||
<Router>
|
||||
<Landing/>
|
||||
</Router>
|
||||
</ApplicationLoader>
|
||||
</Provider>
|
||||
, document.getElementById('root')
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue