Add a line on UI to make search results obvious

This commit is contained in:
Tanner Collin 2020-08-14 03:58:11 +00:00
parent 6576eb1bac
commit c554ecd890

View File

@ -60,27 +60,30 @@ class Results extends React.Component {
</Helmet> </Helmet>
{error && <p>Connection error?</p>} {error && <p>Connection error?</p>}
{stories ? {stories ?
<div> <>
{stories.length ? <p>Search results:</p>
stories.map((x, i) => <div className='comment lined'>
<div className='item' key={i}> {stories.length ?
<div className='title'> stories.map((x, i) =>
<Link className='link' to={'/' + x.id}> <div className='item' key={i}>
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title} <div className='title'>
</Link> <Link className='link' to={'/' + x.id}>
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title}
</Link>
<span className='source'> <span className='source'>
&#8203;({sourceLink(x)}) &#8203;({sourceLink(x)})
</span> </span>
</div>
{infoLine(x)}
</div> </div>
)
{infoLine(x)} :
</div> <p>none</p>
) }
: </div>
<p>no results</p> </>
}
</div>
: :
<p>loading...</p> <p>loading...</p>
} }