Created
October 21, 2021 15:42
-
-
Save VithuJey/f5ca95eca5fb57af57ad890c5c7011b7 to your computer and use it in GitHub Desktop.
Just a gist on localStorage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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