mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 12:58:35 +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])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import * as d3 from 'd3'
|
||||
import { setD3Locale } from '../common/utilities';
|
||||
import { setD3Locale } from '../common/utilities'
|
||||
|
||||
const TEXT_HEIGHT = 15
|
||||
setD3Locale(d3);
|
||||
setD3Locale(d3)
|
||||
class TimelineAxis extends React.Component {
|
||||
constructor () {
|
||||
super()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { mergeDeepLeft } from 'ramda'
|
||||
import global, { colors } from '../common/global'
|
||||
import generateCardLayout from '../common/card'
|
||||
import copy from '../common/data/copy.json';
|
||||
import copy from '../common/data/copy.json'
|
||||
|
||||
const language = process.env.store.app.language;
|
||||
const language = process.env.store.app.language
|
||||
const isSmallLaptop = window.innerHeight < 800
|
||||
const initial = {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user