Merge pull request #5037 from matrix-org/t3chguy/room-list/14705

Fix BaseAvatar wrongly using Buttons when it needs not
This commit is contained in:
Michael Telatynski 2020-07-23 09:27:20 +01:00 committed by GitHub
commit ff8f1af01e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -134,7 +134,7 @@ const BaseAvatar = (props: IProps) => {
aria-hidden="true" />
);
if (onClick !== null) {
if (onClick) {
return (
<AccessibleButton
{...otherProps}
@ -162,7 +162,7 @@ const BaseAvatar = (props: IProps) => {
}
}
if (onClick !== null) {
if (onClick) {
return (
<AccessibleButton
className={classNames("mx_BaseAvatar mx_BaseAvatar_image", className)}
@ -196,4 +196,4 @@ const BaseAvatar = (props: IProps) => {
};
export default BaseAvatar;
export type BaseAvatarType = React.FC<IProps>;
export type BaseAvatarType = React.FC<IProps>;