monkeeShark/src/web/app/common/scripts/generate-default-userdata.js

46 lines
562 B
JavaScript
Raw Normal View History

2017-03-18 11:05:11 +00:00
import uuid from './uuid';
2017-02-18 07:37:22 +00:00
const home = {
left: [
'profile',
'calendar',
'rss-reader',
'photo-stream'
],
right: [
'broadcast',
'notifications',
'user-recommendation',
'donation',
'nav',
'tips'
]
};
2017-03-18 11:05:11 +00:00
export default () => {
2017-02-18 07:37:22 +00:00
const homeData = [];
home.left.forEach(widget => {
homeData.push({
name: widget,
id: uuid(),
place: 'left'
});
});
home.right.forEach(widget => {
homeData.push({
name: widget,
id: uuid(),
place: 'right'
});
});
const data = {
cache: true,
home: homeData
};
return data;
};