From 1a9fb01bcf64a4016fc8167f51871df1a85b692d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 8 Apr 2019 20:53:45 +0300 Subject: Cleanup ESLint warnings --- vnext/src/components/Settings.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'vnext/src/components/Settings.js') 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: '' }; if (preview) { previewUser = { ...visitor, avatar: preview, uname: '' }; @@ -39,7 +40,7 @@ function ChangeAvatarForm({ visitor }) { this.props.onChange(visitor); }); }); - } + }; return (
Recommendations: PNG, 96x96, <50Kb. Also, JPG and GIF supported. @@ -52,6 +53,10 @@ function ChangeAvatarForm({ visitor }) { ); } +ChangeAvatarForm.propTypes = { + visitor: UserType.isRequired +}; + export default class Settings extends React.Component { constructor(props) { super(props); -- cgit v1.2.3