fix: remove or reupload avatar bug (#2502)

Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
This commit is contained in:
Piyush Gupta
2024-04-22 21:21:07 +05:30
committed by GitHub
parent e2d5727cfc
commit dc2ce17aa0
2 changed files with 4 additions and 1 deletions

View File

@@ -52,6 +52,9 @@ export function EditAvatar({ session, environmentId }: { session: Session; envir
toast.error("Avatar update failed. Please try again.");
} finally {
setIsLoading(false);
if (inputRef.current) {
inputRef.current.value = "";
}
}
};

View File

@@ -43,7 +43,7 @@ export const getS3Client = () => {
s3ClientInstance = new S3Client({
credentials,
region: S3_REGION,
endpoint: S3_ENDPOINT_URL,
...(S3_ENDPOINT_URL && { endpoint: S3_ENDPOINT_URL }),
});
}