Include city and state in control view stream description

Resolves #22.
This commit is contained in:
Max Goodhart
2020-06-30 16:14:36 -07:00
parent 1087c6855e
commit c32896d410

View File

@@ -332,12 +332,16 @@ function StreamDelayBox({ delayState, setStreamCensored }) {
function StreamLine({ function StreamLine({
id, id,
row: { label, source, title, link, notes }, row: { label, source, title, link, notes, state, city },
onClickId, onClickId,
}) { }) {
const handleClickId = useCallback(() => { const handleClickId = useCallback(() => {
onClickId(id) onClickId(id)
}) })
let location
if (state && city) {
location = ` (${city} ${state}) `
}
return ( return (
<StyledStreamLine> <StyledStreamLine>
<StyledId onClick={handleClickId}>{id}</StyledId> <StyledId onClick={handleClickId}>{id}</StyledId>
@@ -346,7 +350,8 @@ function StreamLine({
label label
) : ( ) : (
<> <>
<strong>{source}</strong>{' '} <strong>{source}</strong>
{location}
<a href={link} target="_blank"> <a href={link} target="_blank">
{title || link} {title || link}
</a>{' '} </a>{' '}