mizzkey/src/web/app/common/scripts/generate-default-userdata.js
syuilo 45e8331e26 🍣
Closes #12, #227 and #58
2017-03-18 20:05:11 +09:00

46 lines
562 B
JavaScript

import uuid from './uuid';
const home = {
left: [
'profile',
'calendar',
'rss-reader',
'photo-stream'
],
right: [
'broadcast',
'notifications',
'user-recommendation',
'donation',
'nav',
'tips'
]
};
export default () => {
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;
};