fix: Save team logo automatically

closes #1521
This commit is contained in:
Tom Moor
2020-09-08 21:12:37 -07:00
parent c5b7d9be13
commit cc8db7e991

View File

@@ -41,8 +41,10 @@ class Details extends React.Component<Props> {
clearTimeout(this.timeout);
}
handleSubmit = async (ev: SyntheticEvent<>) => {
ev.preventDefault();
handleSubmit = async (event: ?SyntheticEvent<>) => {
if (event) {
event.preventDefault();
}
try {
await this.props.auth.updateTeam({
@@ -66,6 +68,7 @@ class Details extends React.Component<Props> {
handleAvatarUpload = (avatarUrl: string) => {
this.avatarUrl = avatarUrl;
this.handleSubmit();
};
handleAvatarError = (error: ?string) => {