Skip to content

Commit

Permalink
Update data source
Browse files Browse the repository at this point in the history
  • Loading branch information
Riza Nugraha authored and Riza Nugraha committed Sep 17, 2024
1 parent 5a051c8 commit 0bcb1b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/CasesPerCountry.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const CasesPerCountry = ({ country, cases, newCases, weeks, isLogarithmic }) =>

useEffect(() => {
if (country) {
fetch('https://corona.lmao.ninja/v2/countries/' + country.code)
fetch('https://disease.sh/v3/covid-19/countries/' + country.code)
.then(res => res.json())
.then(res => {
if (!res.message) {
Expand All @@ -90,8 +90,8 @@ const CasesPerCountry = ({ country, cases, newCases, weeks, isLogarithmic }) =>
setError(error);
}
)
fetch(`https://corona.lmao.ninja/v2/historical/${country.code}?lastdays=${days}`)
.then(res => res.json())
fetch(`https://disease.sh/v3/covid-19/historical/${country.code}?lastdays=${days}`)
.then(res => res.json())
.then(res => {
if (!res.message) {
setTimelineData(formatData(res.timeline, isLogarithmic));
Expand Down
4 changes: 2 additions & 2 deletions src/components/LeftDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ const LeftDrawer = (props) => {
</FormControl>
<Divider />
<Typography className={classes.formControl} variant="body2" gutterBottom>
Data source: <Link href="https://github.com/NovelCOVID/API">
NovelCOVID API
Data source: <Link href="https://disease.sh/">
Open Disease Data API
</Link>
</Typography>
</>);
Expand Down

0 comments on commit 0bcb1b7

Please sign in to comment.