Clean code up

This commit is contained in:
Tanner Collin 2020-11-03 03:45:56 +00:00
parent ca78a6d7a9
commit e506804666
2 changed files with 6 additions and 6 deletions

View File

@ -57,15 +57,15 @@ class Feed extends React.Component {
{error && <p>Connection error?</p>}
{stories ?
<div>
{stories.map((x, i) =>
<div className='item' key={i}>
{stories.map(x =>
<div className='item' key={x.id}>
<div className='title'>
<Link className='link' to={'/' + x.id}>
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title}
</Link>
<span className='source'>
&#8203;({sourceLink(x)})
({sourceLink(x)})
</span>
</div>

View File

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