diff options
author | 2019-04-08 20:53:45 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:54 +0300 | |
commit | 1a9fb01bcf64a4016fc8167f51871df1a85b692d (patch) | |
tree | c8d202ce2722a62208dc3e6e1a10ca9f0d3ded9a /vnext/src/components/Settings.js | |
parent | e46fe57e15cda3869b07c624bbc138c441055a9a (diff) |
Cleanup ESLint warnings
Diffstat (limited to 'vnext/src/components/Settings.js')
-rw-r--r-- | vnext/src/components/Settings.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vnext/src/components/Settings.js b/vnext/src/components/Settings.js index 29d1b4b5..cf6926f8 100644 --- a/vnext/src/components/Settings.js +++ b/vnext/src/components/Settings.js @@ -1,5 +1,6 @@ import React, { useState, useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; +import ReactRouterPropTypes from 'react-router-prop-types'; import { me, updateAvatar } from '../api'; @@ -24,7 +25,7 @@ function ChangeAvatarForm({ visitor }) { }; reader.readAsDataURL(avatarInput.current.files[0]); } - } + }; let previewUser = { ...visitor, uname: '<preview>' }; if (preview) { previewUser = { ...visitor, avatar: preview, uname: '<preview>' }; @@ -39,7 +40,7 @@ function ChangeAvatarForm({ visitor }) { this.props.onChange(visitor); }); }); - } + }; return ( <form> <small>Recommendations: PNG, 96x96, <50Kb. Also, JPG and GIF supported.</small> @@ -52,6 +53,10 @@ function ChangeAvatarForm({ visitor }) { ); } +ChangeAvatarForm.propTypes = { + visitor: UserType.isRequired +}; + export default class Settings extends React.Component { constructor(props) { super(props); |