}) {
const uploadImageRef = useRef(null);
- // Uploads the selected image and passes the resulting URI to the onUpload function provided in component props.
+ // Uploads image and passes resulting URI to onUpload function provided in component props.
function uploadImage(e) {
const file = e.target.files.item(0);
if (file !== null) { // TODO Add upload progress spinner
}
}
- // Enables/disables save button depending on whether or not the username is different than the current.
+ // Enables/disables button depending on if the typed displayname is different than the current.
function onDisplayNameInputChange() {
setDisabled((username === displayNameRef.current.value) || displayNameRef.current.value === '' || displayNameRef.current.value == null);
}