mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 10:41:56 +10:00
- recreating onyx template
- profile section complete
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user