You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-13 08:02:38 +03:00
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:
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user