Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot authored Dec 5, 2019
1 parent 756f72e commit 35841a6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/components/views/settings/tabs/room/BridgeSettingsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,15 @@ export default class BridgeSettingsTab extends React.Component {
shouldShowPillAvatar={true}
/> bot user.</p>
);
let channelLink = channelName;
if (channel.external_url) {
channelLink = <a target="_blank" href={channel.external_url}>{channelName}</a>;
}

const channelLink = channel.external_url ? (<a target="_blank" href={channel.external_url}>{channelName}</a>) : channelName;
const networkLink = network && network.external_url ? (<a target="_blank" href={network.external_url}>{networkName}</a>)
: networkName;
let networkLink = networkName;
if (network && network.external_url) {
networkLink = <a target="_blank" href={network.external_url}>{networkName}</a>;
}

const chanAndNetworkInfo = (
<p> Bridged into {channelLink} {networkLink}, on {protocolName}</p>
Expand Down

0 comments on commit 35841a6

Please sign in to comment.