unintentional timestamp precision show up normally

This commit is contained in:
Lachlan Kermode
2020-02-09 16:05:47 +13:00
parent a66a878d2a
commit 6ad9b12370
3 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@ build/
node_modules/
config.js
dev.config.js
tags
src/\.DS_Store

View File

@@ -61,7 +61,7 @@ class Card extends React.Component {
<CardLocation
language={this.props.language}
location={this.props.event.location}
isPrecise={(this.props.event.type === 'Structure')}
isPrecise={(!this.props.event.type || this.props.event.type === 'Structure')}
/>
)
}

View File

@@ -8,12 +8,13 @@ const CardTimestamp = ({ timelabel, language, precision }) => {
// const estimatedLang = copy[language].cardstack.estimated
const unknownLang = copy[language].cardstack.unknown_time
console.log(precision)
if (isNotNullNorUndefined(timelabel)) {
return (
<div className='card-cell timestamp'>
<p>
<i className='material-icons left'>today</i>
{timelabel}{(precision !== '') ? ` - ${precision}` : ''}
{timelabel}{(precision && precision !== '') ? ` - ${precision}` : ''}
</p>
</div>
)