Skip to content

Commit fc569d4

Browse files
authored
Merge pull request #1 from PrinceSumberia/nextFeatures
Next features
2 parents b0a4ca3 + 35367fe commit fc569d4

36 files changed

+1693
-228
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Prince Sumberia
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
# COVID-19 Tracker
22

3+
<p align="center">
4+
<img src="./src/assets/screesnhot.png" width="100%">
5+
</p>
6+
7+
<p align="center">
8+
View <a href="https://covidindiatracker.netlify.app/">Covid-19 India Tracker</a>
9+
</p>
10+
311
## Project Setup
12+
413
```
514
npm install
615
```
716

817
## Run Locally
18+
919
```
1020
npm start
1121
```
22+
23+
## Contribute
24+
25+
Covid-19 India Tracker is an open source project. So, feel free to contribute. And if you're new to contributing to Open Source on Github, then [this guide](https://guides.github.com/activities/contributing-to-open-source/) will help you.
26+
27+
If you find any error or have any suggestion, feel free to create an [issue](https://github.com/PrinceSumberia/covid-19-tracker/issues/new).
28+
29+
## Credits
30+
31+
- Thanks, [@covid19india](https://github.com/covid19india) for the awesome [API](https://api.covid19india.org/). Was previously using [this API](https://api.rootnet.in/covid19-in/)
32+
- Thanks, [Drawer](https://drawer.design/products/coronavirus-icons) for the awesome Icons.

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
"@testing-library/user-event": "^7.2.1",
1515
"axios": "^0.19.2",
1616
"classnames": "^2.2.6",
17+
"date-fns": "^2.13.0",
1718
"react": "^16.13.1",
19+
"react-content-loader": "^5.0.4",
1820
"react-dom": "^16.13.1",
1921
"react-fade-in": "^1.0.0",
2022
"react-lottie": "^1.2.3",

src/App.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
}
44

55
.navBar {
6-
flex: 0 0 10%;
6+
flex: 0 0 8%;
77
min-height: 100vh;
88
background-color: #1A1053;
99
color: rgba(255, 255, 255, .9);
10-
/* color: (props)=> props.isDarkMode ? "rgba(255,255,255,.87)": "rgba(255,255,255,.9)", */
1110
text-transform: capitalize;
1211
display: flex;
1312
justify-content: center;
@@ -18,4 +17,20 @@
1817
padding: 4rem;
1918
position: relative;
2019
overflow: hidden;
20+
}
21+
22+
@media (max-width: 991.98px) {
23+
.root {
24+
flex-direction: column;
25+
}
26+
27+
.navBar {
28+
min-height: 10vh;
29+
justify-content: space-around;
30+
align-items: center;
31+
}
32+
33+
.mainContent {
34+
padding: 0;
35+
}
2136
}

src/App.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import "./App.css";
55
import Navbar from "./components/Navbar";
66
import { Switch, Route } from "react-router-dom";
77
import StaySafe from "./components/StaySafe";
8+
import Help from "./components/Help";
9+
import Symptoms from "./components/Symptoms";
810

911
class App extends Component {
1012
constructor(props) {
@@ -39,9 +41,9 @@ class App extends Component {
3941
/>
4042
)}
4143
/>
42-
<Route exact path="/symptoms" render={() => <h1>symptoms</h1>} />
44+
<Route exact path="/symptoms" render={() => <Symptoms />} />
4345
<Route exact path="/stay-safe" render={() => <StaySafe />} />
44-
<Route exact path="/help" render={() => <h1>Help Page</h1>} />
46+
<Route exact path="/essentials" render={() => <Help />} />
4547
<Route
4648
path="/"
4749
render={() => (

src/assets/screesnhot.png

116 KB
Loading

src/components/Barchart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class Barchart extends Component {
2626
} catch (err) {}
2727

2828
return (
29-
<div className="charts">
29+
<div className="barcharts">
3030
{!isLoading && (
3131
<BarChart
3232
width={350}

src/components/Charts.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
import React, { Component } from "react";
2-
import { LineChart, Line, XAxis, YAxis, Tooltip, Legend } from "recharts";
2+
import {
3+
LineChart,
4+
Line,
5+
XAxis,
6+
YAxis,
7+
Tooltip,
8+
Legend,
9+
ResponsiveContainer,
10+
} from "recharts";
311
import colors from "../constants/colors";
412
import "../styles/Charts.css";
513

614
export default class Charts extends Component {
715
render() {
8-
const { isLoading, data } = this.props;
16+
const { data } = this.props;
917
let result;
1018
try {
1119
const updatedData = data.slice(1).slice(-50);
@@ -29,7 +37,7 @@ export default class Charts extends Component {
2937

3038
return (
3139
<div className="charts">
32-
{!isLoading && (
40+
<ResponsiveContainer>
3341
<LineChart
3442
width={600}
3543
height={300}
@@ -75,7 +83,7 @@ export default class Charts extends Component {
7583
dot={false}
7684
/>
7785
</LineChart>
78-
)}
86+
</ResponsiveContainer>
7987
</div>
8088
);
8189
}

0 commit comments

Comments
 (0)