From bfdf1251e809ef97460c7dff7242474193d66ef2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 12 Feb 2019 19:59:31 +0100 Subject: [PATCH] only wrap e2e icon in button if there is a click handler --- src/components/views/rooms/E2EIcon.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/E2EIcon.js b/src/components/views/rooms/E2EIcon.js index b421bcfb5f..54260e4ee2 100644 --- a/src/components/views/rooms/E2EIcon.js +++ b/src/components/views/rooms/E2EIcon.js @@ -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 ( -
- ); + const icon = (
); + if (props.onClick) { + return ({ icon }); + } else { + return icon; + } }