save board model to localstorage
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user