mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-13 05:48:36 +03:00
animated hover for sources
This commit is contained in:
@@ -93,7 +93,7 @@ class Card extends React.Component {
|
||||
|
||||
const source_lang = copy[this.props.language].cardstack.sources
|
||||
return (
|
||||
<div>
|
||||
<div className="card-col">
|
||||
<h4>{source_lang}: </h4>
|
||||
{this.props.event.sources.map(source => (
|
||||
<CardSource
|
||||
|
||||
@@ -5,27 +5,16 @@ import copy from '../../js/data/copy.json'
|
||||
|
||||
const CardSource = ({ source, language, isLoading, error }) => {
|
||||
|
||||
function renderContent() {
|
||||
if (isLoading) {
|
||||
return <Spinner/>
|
||||
} else if (source.error) {
|
||||
return (
|
||||
<div><small>{source.error}</small></div>
|
||||
)
|
||||
} else {
|
||||
/* source with no errors */
|
||||
return (
|
||||
<div>
|
||||
<p>{source.id}</p>
|
||||
<i className="material-icons md-36">photo</i>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="card-row card-cell source">
|
||||
{renderContent()}
|
||||
<div className="card-source">
|
||||
{isLoading
|
||||
? <Spinner/>
|
||||
: (
|
||||
<div className="source-row">
|
||||
<i className="material-icons md-36 source-icon">photo</i>
|
||||
<p>{source.id}</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user