Skip to content

Instantly share code, notes, and snippets.

@VithuJey
Created October 21, 2021 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VithuJey/f5ca95eca5fb57af57ad890c5c7011b7 to your computer and use it in GitHub Desktop.
Save VithuJey/f5ca95eca5fb57af57ad890c5c7011b7 to your computer and use it in GitHub Desktop.
Just a gist on localStorage
function userPermission({ userID: string }) {
const res = await fetch(`https://api.amazon.com/user/${userID}`);
const userPermission = await res.json();
localStorage.setItem("userPermission", JSON.stringify(userPermission));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment