1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-12 04:50:06 +02:00
copilot/frontend/src/root.js

95 lines
2.1 KiB
JavaScript
Raw Normal View History

2016-10-20 04:14:26 +03:00
const React = require('react');
2016-10-20 22:42:39 +03:00
const ReactIntlRedux = require('react-intl-redux');
2016-10-20 04:14:26 +03:00
const ReactHotLoader = require('react-hot-loader');
const ReactRedux = require('react-redux');
const ReactRouter = require('react-router');
2016-12-05 22:28:10 +02:00
const App = require('@containers/app');
2016-12-14 00:09:04 +02:00
const Store = require('@state/store');
2016-10-20 04:14:26 +03:00
2016-10-20 22:42:39 +03:00
const {
IntlProvider
} = ReactIntlRedux;
2016-10-20 04:14:26 +03:00
const {
AppContainer
} = ReactHotLoader;
const {
Provider
} = ReactRedux;
const {
BrowserRouter
} = ReactRouter;
2016-12-14 00:09:04 +02:00
const store = Store({
projects: {
data: [{
uuid: 'e0ea0c02-55cc-45fe-8064-3e5176a59401',
org: 'e12ad7db-91b2-4154-83dd-40dcfc700dcc',
id: 'forest-foundation-dev',
name: 'Forest Foundation Dev',
plan: '20.05$ per day'
}, {
uuid: '9fcb374d-a267-4c2a-9d9c-ba469b804639',
org: 'e12ad7db-91b2-4154-83dd-40dcfc700dcc',
id: 'forest-foundation-testing',
name: 'Forest Foundation Testing',
plan: '20.05$ per day'
}, {
uuid: 'ac2c2498-e865-4ee3-9e26-8c75a81cbe25',
org: 'e12ad7db-91b2-4154-83dd-40dcfc700dcc',
id: 'forest-foundation-production',
name: 'Forest Foundation Production',
plan: '100.17$ per day'
}]
},
orgs: {
ui: {
sections: [
'projects',
'people',
'settings'
]
},
data: [{
hide: ['people'],
owner: 'b94033c1-3665-4c36-afab-d9c3d0b51c01',
id: 'nicola',
name: 'Your Dashboard'
}, {
owner: 'b94033c1-3665-4c36-afab-d9c3d0b51c01',
uuid: 'e12ad7db-91b2-4154-83dd-40dcfc700dcc',
id: 'biz-tech',
name: 'BizTech'
}, {
owner: 'b94033c1-3665-4c36-afab-d9c3d0b51c01',
uuid: '551f316d-e414-480f-9787-b4c408db3edd',
id: 'make-us-proud',
name: 'Make Us Proud',
}]
},
account: {
2016-12-14 00:09:04 +02:00
data: {
uuid: 'b94033c1-3665-4c36-afab-d9c3d0b51c01',
2016-12-15 16:10:36 +02:00
id: 'nicola',
name: 'Nicola'
2016-12-14 00:09:04 +02:00
}
}
});
2016-10-20 04:14:26 +03:00
module.exports = () => {
return (
<AppContainer>
2016-12-14 00:09:04 +02:00
<Provider store={store}>
2016-10-20 22:42:39 +03:00
<IntlProvider>
<BrowserRouter>
{App}
</BrowserRouter>
</IntlProvider>
2016-10-20 04:14:26 +03:00
</Provider>
</AppContainer>
);
};