save board model to localstorage

This commit is contained in:
fbruc03
2022-11-15 16:11:35 +01:00
parent e00617ac78
commit 6fcaff9cc3
3 changed files with 71 additions and 70 deletions
+8 -7
View File
@@ -1,10 +1,11 @@
import {
BOARD,
} from "./types";
BOARD,
} from "./types";
export const setBoard = (board) => (dispatch) => {
dispatch({
type: BOARD,
payload: board,
});
};
window.localStorage.setItem("board", board);
dispatch({
type: BOARD,
payload: board,
});
};