mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 18:51:32 +10:00
- fix issue with firebase-hooks
- implement custom useAuthState
This commit is contained in:
@ -5,7 +5,7 @@ import DatabaseContext from "./DatabaseContext";
|
||||
const ResumeContext = createContext({});
|
||||
|
||||
const ResumeProvider = ({ children }) => {
|
||||
const { updateResume } = useContext(DatabaseContext);
|
||||
const { debouncedUpdate } = useContext(DatabaseContext);
|
||||
|
||||
const [state, dispatch] = useReducer((state, { type, payload }) => {
|
||||
let newState;
|
||||
@ -13,7 +13,7 @@ const ResumeProvider = ({ children }) => {
|
||||
switch (type) {
|
||||
case "on_input":
|
||||
newState = set({ ...state }, payload.path, payload.value);
|
||||
updateResume(newState);
|
||||
debouncedUpdate(newState);
|
||||
return newState;
|
||||
case "set_data":
|
||||
return payload;
|
||||
|
||||
Reference in New Issue
Block a user