mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 05:18:34 +03:00
Lint fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import copy from './data/copy.json';
|
||||
const {date_title, location_title, summary_title} = copy[process.env.store.app.language].cardstack;
|
||||
import copy from './data/copy.json'
|
||||
const cardStack = copy[process.env.store.app.language].cardstack
|
||||
|
||||
// Sensible defaults for generating a basic card layout
|
||||
// based on the example Timemap datasheet.
|
||||
@@ -9,12 +9,12 @@ const basic = ({ event }) => {
|
||||
[
|
||||
{
|
||||
kind: 'date',
|
||||
title: date_title || 'Incident Dates',
|
||||
title: cardStack['date_title'] || 'Incident Dates',
|
||||
value: event.datetime || event.date || ``
|
||||
},
|
||||
{
|
||||
kind: 'text',
|
||||
title: location_title || 'Location',
|
||||
title: cardStack['location_title'] || 'Location',
|
||||
value: event.location || `—`
|
||||
}
|
||||
],
|
||||
@@ -22,7 +22,7 @@ const basic = ({ event }) => {
|
||||
[
|
||||
{
|
||||
kind: 'text',
|
||||
title: summary_title || 'Summary',
|
||||
title: cardStack['summary_title'] || 'Summary',
|
||||
value: event.description || ``,
|
||||
scaleFont: 1.1
|
||||
}
|
||||
|
||||
@@ -413,12 +413,12 @@ export function makeNiceDate (datetime) {
|
||||
* Sets the default locale for d3 to format dates in each available language.
|
||||
* @param {Object} d3 - An instance of D3
|
||||
*/
|
||||
export function setD3Locale(d3) {
|
||||
export function setD3Locale (d3) {
|
||||
const languages = {
|
||||
'es-MX': require('./data/es-MX.json')
|
||||
}
|
||||
|
||||
if (process.env.store.app.language !== 'es-US' && languages[process.env.store.app.language]) {
|
||||
d3.timeFormatDefaultLocale(languages[process.env.store.app.language]);
|
||||
d3.timeFormatDefaultLocale(languages[process.env.store.app.language])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user