Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ yarn-error.log*

# vercel
.vercel

.env.local
2 changes: 1 addition & 1 deletion components/cards/counties-map/counties-map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class CountiesMap extends React.PureComponent {
trigger: 'item',
formatter: (item) => `
<b>${item.name}</b></br>
Cazuri totale: ${item.data.countyInfectionsNumbers}</br>
Cazuri totale: ${item.data.cases}</br>
Incidență cumulată: ${item.value}`,
},
visualMap: {
Expand Down
2 changes: 1 addition & 1 deletion components/cards/counties-table/counties-table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class CountiesTable extends React.PureComponent {
{
className: 'has-text-right',
displayName: 'Cazuri totale',
name: 'countyInfectionsNumbers',
name: 'cases',
},
{
className: 'has-text-right',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
import React from 'react'
import { Card } from '../../layout/card/card'
import { formatDate } from '../../../utils/date'
import { parseLargeCitiesIncidentsTable } from '../../../utils/parse'
import { parseCitiesTable } from '../../../utils/parse'
import { Table } from '../../layout/table/Table'

export const EMBED_LARGE_CITIES_INCIDENTS_TABLE = 'large-cities-incidents-table'

export class LargeCitiesIncidentsTable extends React.PureComponent {
render() {
const { error, lastUpdatedOn, stale, data } =
parseLargeCitiesIncidentsTable(this.props.state)
const { error, lastUpdatedOn, stale, data } = parseCitiesTable(this.props.state, 'largeCities')

const headers = [
{ className: '', displayName: 'Județ', name: 'judet' },
{
className: '',
displayName: 'Județ',
name: 'county',
},
{
className: '',
displayName: 'Localitate',
name: 'localitate',
name: 'city',
},
{
className: 'has-text-right',
displayName: 'Populație',
name: 'populatie',
name: 'population',
},
{
className: 'has-text-right',
displayName: 'Cazuri',
name: 'cases',
},
{ className: 'has-text-right', displayName: 'Cazuri', name: 'cazuri' },
{
className: 'has-text-right',
displayName: 'Incidență',
name: 'incidenta',
name: 'incidence',
},
]
return (
Expand All @@ -38,7 +45,7 @@ export class LargeCitiesIncidentsTable extends React.PureComponent {
embedPath={EMBED_LARGE_CITIES_INCIDENTS_TABLE}
isStale={stale}
>
<Table headers={headers} data={data} sortByColumn="incidenta" />
<Table headers={headers} data={data} sortByColumn="incidence" />
</Card>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,39 @@ import React from 'react'
import { Card } from '../../layout/card/card'
import { Table } from '../../layout/table/Table'
import { formatDate } from '../../../utils/date'
import { parseSmallCitiesIncidentsTable } from '../../../utils/parse'
import { parseCitiesTable } from '../../../utils/parse'

export const EMBED_SMALL_CITIES_INCIDENTS_TABLE = 'small-cities-incidents-table'

export class SmallCitiesIncidentsTable extends React.PureComponent {
render() {
const { error, lastUpdatedOn, stale, data } =
parseSmallCitiesIncidentsTable(this.props.state)
const { error, lastUpdatedOn, stale, data } = parseCitiesTable(this.props.state, 'smallCities')

const headers = [
{ className: '', displayName: 'Județ', name: 'judet' },
{
className: '',
displayName: 'Județ',
name: 'county',
},
{
className: '',
displayName: 'Localitate',
name: 'localitate',
name: 'city',
},
{
className: 'has-text-right',
displayName: 'Populație',
name: 'populatie',
name: 'population',
},
{
className: 'has-text-right',
displayName: 'Cazuri',
name: 'cases',
},
{ className: 'has-text-right', displayName: 'Cazuri', name: 'cazuri' },
{
className: 'has-text-right',
displayName: 'Incidență',
name: 'incidenta',
name: 'incidence',
},
]

Expand All @@ -39,7 +46,7 @@ export class SmallCitiesIncidentsTable extends React.PureComponent {
embedPath={EMBED_SMALL_CITIES_INCIDENTS_TABLE}
isStale={stale}
>
<Table headers={headers} data={data} sortByColumn="incidenta" />
<Table headers={headers} data={data} sortByColumn="incidence" />
</Card>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class VaccinesPerDayCard extends React.PureComponent {
</p>
<p>
Datele despre vaccin din 9 iulie se regăsesc în
setul de date din 10 iulie.
setul de date din 10 iulie.
</p>
</Card>
)
Expand Down
4 changes: 2 additions & 2 deletions config/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export const Constants = {
}

export const ApiURL = {
allData: Constants.api + '/latestData.json',
smallData: Constants.api + '/smallData.json',
allData: Constants.api + '/full',
smallData: Constants.api + '/partial',
}
Loading