Skip to content

Instantly share code, notes, and snippets.

@Utopiah
Last active March 4, 2021 07:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Utopiah/df11eb7e467ca076297a95d810e7539d to your computer and use it in GitHub Desktop.
Save Utopiah/df11eb7e467ca076297a95d810e7539d to your computer and use it in GitHub Desktop.
changeAvatarByAvatarId("4JRhjmU")
function changeAvatarByAvatarId(avatarId){
window.APP.store.update({ profile: { ...(window.APP.store.state.profile), avatarId } });
}
// for testing window.APP.store.resetToRandomDefaultAvatar()
// to potential programmatically upload avatars https://github.com/mozilla/hubs/blob/master/src/react-components/avatar-editor.js#L108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment