|
|
@ -68,17 +68,19 @@ class Avatar extends React.Component { |
|
|
|
); |
|
|
|
const { imageUrl } = this.state; |
|
|
|
return ( |
|
|
|
<Upload |
|
|
|
name="avatar" |
|
|
|
listType="picture-card" |
|
|
|
className="avatar-uploader" |
|
|
|
showUploadList={false} |
|
|
|
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" |
|
|
|
beforeUpload={beforeUpload} |
|
|
|
onChange={this.handleChange} |
|
|
|
> |
|
|
|
{imageUrl ? <img src={imageUrl} alt="avatar" /> : uploadButton} |
|
|
|
</Upload> |
|
|
|
<div className="clearfix"> |
|
|
|
<Upload |
|
|
|
name="avatar" |
|
|
|
listType="picture-card" |
|
|
|
className="avatar-uploader" |
|
|
|
showUploadList={false} |
|
|
|
action="https://www.mocky.io/v2/5cc8019d300000980a055e76" |
|
|
|
beforeUpload={beforeUpload} |
|
|
|
onChange={this.handleChange} |
|
|
|
> |
|
|
|
{imageUrl ? <img src={imageUrl} alt="avatar" /> : uploadButton} |
|
|
|
</Upload> |
|
|
|
</div> |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|