31 lines
819 B
JavaScript
31 lines
819 B
JavaScript
/* global document */
|
|
|
|
const r = require('r-dom');
|
|
|
|
const { render } = require('react-dom');
|
|
|
|
const { Provider } = require('react-redux');
|
|
|
|
const createStore = require('./store');
|
|
|
|
const Graph = require('./components/graph');
|
|
const Cards = require('./components/cards');
|
|
const Preferences = require('./components/preferences');
|
|
const { HotKeys } = require('./components/hot-keys');
|
|
|
|
const theme = require('./utils/theme');
|
|
|
|
const Root = () => r(Provider, {
|
|
store: createStore(),
|
|
}, r(HotKeys, {}, ({ graphRef, cardsRef, preferencesRef }) => [
|
|
r(Graph, { ref: graphRef }),
|
|
r(Cards, { ref: cardsRef }),
|
|
r(Preferences, { ref: preferencesRef }),
|
|
]));
|
|
|
|
Object.entries(theme.colors).forEach(([ key, value ]) => {
|
|
document.body.style.setProperty('--' + key, value);
|
|
});
|
|
|
|
render(r(Root), document.getElementById('root'));
|