forked from tanner/qotnews
Clean code up
This commit is contained in:
parent
ca78a6d7a9
commit
e506804666
|
@ -57,15 +57,15 @@ class Feed extends React.Component {
|
||||||
{error && <p>Connection error?</p>}
|
{error && <p>Connection error?</p>}
|
||||||
{stories ?
|
{stories ?
|
||||||
<div>
|
<div>
|
||||||
{stories.map((x, i) =>
|
{stories.map(x =>
|
||||||
<div className='item' key={i}>
|
<div className='item' key={x.id}>
|
||||||
<div className='title'>
|
<div className='title'>
|
||||||
<Link className='link' to={'/' + x.id}>
|
<Link className='link' to={'/' + x.id}>
|
||||||
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title}
|
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<span className='source'>
|
<span className='source'>
|
||||||
​({sourceLink(x)})
|
({sourceLink(x)})
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -64,15 +64,15 @@ class Results extends React.Component {
|
||||||
<p>Search results:</p>
|
<p>Search results:</p>
|
||||||
<div className='comment lined'>
|
<div className='comment lined'>
|
||||||
{stories.length ?
|
{stories.length ?
|
||||||
stories.map((x, i) =>
|
stories.map(x =>
|
||||||
<div className='item' key={i}>
|
<div className='item' key={x.id}>
|
||||||
<div className='title'>
|
<div className='title'>
|
||||||
<Link className='link' to={'/' + x.id}>
|
<Link className='link' to={'/' + x.id}>
|
||||||
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title}
|
<img className='source-logo' src={logos[x.source]} alt='source logo' /> {x.title}
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<span className='source'>
|
<span className='source'>
|
||||||
​({sourceLink(x)})
|
({sourceLink(x)})
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user