mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-15 09:11:57 +10:00
release: v3.6.9
This commit is contained in:
@ -40,7 +40,7 @@ export const resumeSlice = createSlice({
|
||||
addItem: (state: Resume, action: PayloadAction<AddItemPayload>) => {
|
||||
const { path, value } = action.payload;
|
||||
const id = uuidv4();
|
||||
const list = get(state, path, []);
|
||||
const list: ListItem[] = get(state, path, []);
|
||||
const item = merge(value, { id });
|
||||
|
||||
list.push(item);
|
||||
|
||||
@ -18,7 +18,10 @@ import {
|
||||
|
||||
const DEBOUNCE_WAIT = 1000;
|
||||
|
||||
const debouncedSync = debounce((resume: Resume, dispatch: AppDispatch) => updateResume(resume).then((resume) => dispatch(setResume(resume))), DEBOUNCE_WAIT);
|
||||
const debouncedSync = debounce(
|
||||
(resume: Resume, dispatch: AppDispatch) => updateResume(resume).then((resume) => dispatch(setResume(resume))),
|
||||
DEBOUNCE_WAIT
|
||||
);
|
||||
|
||||
function* handleSync(dispatch: AppDispatch) {
|
||||
const resume: Resume = yield select((state: RootState) => state.resume.present);
|
||||
@ -27,9 +30,8 @@ function* handleSync(dispatch: AppDispatch) {
|
||||
}
|
||||
|
||||
function* syncSaga(dispatch: AppDispatch) {
|
||||
yield takeLatest(
|
||||
[setResumeState, addItem, editItem, duplicateItem, deleteItem, addSection, deleteSection],
|
||||
() => handleSync(dispatch)
|
||||
yield takeLatest([setResumeState, addItem, editItem, duplicateItem, deleteItem, addSection, deleteSection], () =>
|
||||
handleSync(dispatch)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user