mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 03:36:07 +03:00
only wrap e2e icon in button if there is a click handler
This commit is contained in:
parent
5e298dc58d
commit
bfdf1251e8
1 changed files with 6 additions and 3 deletions
|
@ -36,7 +36,10 @@ export default function(props) {
|
|||
_t("All devices for this user are trusted") :
|
||||
_t("All devices in this encrypted room are trusted");
|
||||
}
|
||||
return (<AccessibleButton onClick={props.onClick}>
|
||||
<div className={e2eIconClasses} title={e2eTitle} />
|
||||
</AccessibleButton>);
|
||||
const icon = (<div className={e2eIconClasses} title={e2eTitle} />);
|
||||
if (props.onClick) {
|
||||
return (<AccessibleButton onClick={props.onClick}>{ icon }</AccessibleButton>);
|
||||
} else {
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue