Skip to content

Commit

Permalink
Add unknown person
Browse files Browse the repository at this point in the history
  • Loading branch information
yassine.selmi committed Apr 2, 2020
1 parent 35908bc commit 52805d8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions frontend/images/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import female_cured from './female/cured.png'
import female_dead from './female/dead.png'
import female_hosp from './female/hospitalized.png'

import unknown_cured from './unknown/cured.png'
import unknown_dead from './unknown/dead.png'
import unknown_hosp from './unknown/hospitalized.png'


import abroad from './filter/abroad.png'
import state from './filter/state.png'
import city from './filter/city.png'
Expand All @@ -22,6 +27,9 @@ export {
female_cured,
female_dead,
female_hosp,
unknown_cured,
unknown_dead,
unknown_hosp,
state,
city,
state_node,
Expand Down
Binary file added frontend/images/unknown/cured.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/images/unknown/dead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/images/unknown/hospitalized.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion frontend/util/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ import {
female_cured,
female_hosp,
female_dead,
unknown_cured,
unknown_dead,
unknown_hosp,
} from '../images'
import dotProp from 'dot-prop-immutable'

Expand Down Expand Up @@ -93,7 +96,15 @@ export function getIcon(patient) {
return female_hosp
}
} else {
return female_hosp
if (patient.status === 'Recovered') {
return unknown_cured
} else if (patient.status === 'Hospitalized') {
return unknown_hosp
} else if (patient.status === 'Deceased') {
return unknown_dead
} else {
return unknown_hosp
}
}
}

Expand Down

0 comments on commit 52805d8

Please sign in to comment.