more organization, added references and languages

This commit is contained in:
Amruth Pillai
2020-03-27 16:41:54 +05:30
parent e3b6cea833
commit 1de3aaa523
14 changed files with 659 additions and 220 deletions

View File

@ -55,6 +55,16 @@ const initialState = {
heading: 'Skills & Hobbies',
items: [],
},
languages: {
enable: false,
heading: 'Languages',
items: [],
},
references: {
enable: false,
heading: 'References',
items: [],
},
extras: {
enable: false,
heading: 'Personal Information',
@ -78,6 +88,8 @@ const reducer = (state, { type, payload }) => {
let items;
switch (type) {
case 'migrate_section':
return set({ ...state }, `data.${payload.key}`, payload.value);
case 'add_item':
items = get({ ...state }, `data.${payload.key}.items`, []);
items.push(payload.value);