- recreating onyx template

- profile section complete
This commit is contained in:
Amruth Pillai
2020-07-05 16:45:29 +05:30
parent 03e1de1d14
commit 49a867dd37
17 changed files with 159 additions and 53 deletions

View File

@ -2,11 +2,14 @@ import { set } from "lodash";
import React, { createContext, useReducer } from "react";
const initialState = {
id: "dafa3242-f39a-4755-bab3-be3c3ca3d190",
profile: {
photograph: "",
firstName: "",
lastName: "",
},
createdAt: "",
updatedAt: "",
};
const ResumeContext = createContext(initialState);
@ -16,6 +19,8 @@ const ResumeProvider = ({ children }) => {
switch (type) {
case "on_input":
return set({ ...state }, payload.path, payload.value);
case "set_data":
return payload;
default:
throw new Error();
}