Covid19india-react: Clicking on Deceased option in state page doesn't show the number in the placeholder below

Created on 2 May 2020  路  5Comments  路  Source: covid19india/covid19india-react

Describe the bug
Go to any of the state's page. Clicking on any other option except for "Deceased" shows the number but not for deceased

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://www.covid19india.org/state/MH'
  2. Click on 'Deceased'
  3. Doesn't show the number in the placeholder below

Expected behavior
Like all other options there, "Confirmed", "Active" and "Recovered", I expect "Deceased" too should be showing the numbers when clicked

Screenshots
Clicking on "Deceased", did not show the number 485 below.
deceased_error

Clicking on "Recovered", showed the number 1879 below.
recovered_Example

Desktop (please complete the following information):

  • OS: Windows
  • Browser Firefox, Chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device:Realme 3 pro
  • OS: Android
  • Browser Chrome
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Revision Needed

Most helpful comment

I can confirm that the issues exist.
I believe I can solve the issue, I'm gonna try right away.

image

image

image

All 5 comments

This seems to be working on firefox + OSX. Need someone on android/windows to have a look before we resolve this issue.
Screenshot 2020-05-02 at 4 36 54 PM

Hey, @bee-rickey I think you misunderstood the issue here because as far as I can see on the website when the state page is opened and no district is selected then the issue persists with a deceased value like in the ss shared by @DikshantYadav19 only Maharashtra is selected and no region is selected, once you click the region it works totally fine like in the ss shared by you.

Screenshot from 2020-05-02 17-37-58

The issue persists because we are showing the value of a deceased key in the object which if you can see is present in Maharashtra object as death that's why it's returning null, other keys active and confirmed are same in both state and district object. We can simply put a condition for checking in below line if its a State object and the deceased option are selected.

https://github.com/covid19india/covid19india-react/blob/7149f5a88a0595b138678fecd96901dfd8b31f09/src/components/mapexplorer.js#L304

I can confirm that the issues exist.
I believe I can solve the issue, I'm gonna try right away.

image

image

image

Fixed via 9ff0278

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SumanthKongani picture SumanthKongani  路  6Comments

alkuhlani picture alkuhlani  路  4Comments

mohammedrehan275 picture mohammedrehan275  路  6Comments

srikrishnamoorthis picture srikrishnamoorthis  路  4Comments

ikshitiz picture ikshitiz  路  4Comments