Created
January 2, 2018 21:04
-
-
Save rxluz/0ae15abdc490df8292df3017bf4d73c4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const save = (id) => { | |
//your save code here | |
return { | |
goToUserProfile: (name) => | |
confirm(`Hi ${name}, you'd like to be redirected to your page`) | |
? window.location.replace(`https://myurl.example/profile/${id}`) | |
: false | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment