Fix BaseAvatar wrongly using Buttons when it needs not
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
6bb9be56cd
commit
6546f98e18
1 changed files with 3 additions and 3 deletions
|
@ -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>;
|
||||
|
|
Loading…
Reference in a new issue