Skip to content

Instantly share code, notes, and snippets.

@pushkar100
Last active July 6, 2022 15:12
Show Gist options
  • Save pushkar100/2a9319b9b7d6cf0f294a3656b122c900 to your computer and use it in GitHub Desktop.
Save pushkar100/2a9319b9b7d6cf0f294a3656b122c900 to your computer and use it in GitHub Desktop.
/* testing/src/helpers/index.js */
// ...
const setTraysForId = (id, trays) => {
window.localStorage.setItem(`${id}`, JSON.stringify(trays));
}
const getTraysForId = (id) => {
return JSON.parse(window.localStorage.getItem(`${id}`));
}
export { /* ... */, setTraysForId, getTraysForId };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment