This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/_Dashboard/app/renderer/app.js

41 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-07-30 20:59:37 +02:00
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
2020-08-01 15:42:10 +02:00
import { createStore } from 'redux';
import rootReducer from './store/reducers';
2020-08-01 16:29:29 +02:00
import CssBaseline from '@material-ui/core/CssBaseline';
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
import { ThemeProvider } from '@material-ui/core/styles';
import LampButtonList from './components/LampButtonList';
2020-08-10 14:55:31 +02:00
import Header from './components/Header';
2020-07-30 20:59:37 +02:00
2020-08-01 15:42:10 +02:00
const store = createStore(
rootReducer,
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(),
);
2020-07-30 20:59:37 +02:00
2020-08-01 16:29:29 +02:00
const darkTheme = createMuiTheme({
palette: {
type: 'dark',
primary: {
main: '#23272A',
},
secondary: {
main: '#7289DA',
},
},
});
2020-07-30 20:59:37 +02:00
const rootElement = document.querySelector(document.currentScript.getAttribute('data-container'));
ReactDOM.render(
<Provider store={store}>
2020-08-01 16:29:29 +02:00
<ThemeProvider theme={darkTheme}>
<CssBaseline />
2020-08-10 14:55:31 +02:00
<Header error={false} />
2020-08-01 16:29:29 +02:00
<LampButtonList />
</ThemeProvider>
2020-07-30 20:59:37 +02:00
</Provider>,
rootElement,
);