spee.ch/react/components/UrlMiddle.jsx
2018-01-09 18:25:38 -08:00

16 lines
680 B
JavaScript

import React from 'react';
function UrlMiddle ({publishToChannel, loggedInChannelName, loggedInChannelShortId}) {
if (publishToChannel) {
if (loggedInChannelName) {
return <span id="url-channel" className="url-text--secondary">{loggedInChannelName}:{loggedInChannelShortId} /</span>;
}
return <span id="url-channel-placeholder" className="url-text--secondary tooltip">@channel<span
className="tooltip-text">Select a channel below</span> /</span>;
}
return (
<span id="url-no-channel-placeholder" className="url-text--secondary tooltip">xyz<span className="tooltip-text">This will be a random id</span> /</span>
);
}
export default UrlMiddle;