Skip to content

Commit 8e9e03a

Browse files
Fix dark mode button bug and remove unused vars
1 parent 27996f7 commit 8e9e03a

File tree

4 files changed

+7
-22
lines changed

4 files changed

+7
-22
lines changed

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@testing-library/user-event": "^7.2.1",
1515
"axios": "^0.19.2",
1616
"classnames": "^2.2.6",
17-
"gh-pages": "^2.2.0",
1817
"react": "^16.13.1",
1918
"react-dom": "^16.13.1",
2019
"react-router-dom": "^5.1.2",
@@ -24,8 +23,6 @@
2423
"recharts": "^1.8.5"
2524
},
2625
"scripts": {
27-
"predeploy": "npm run build",
28-
"deploy": "gh-pages -d build",
2926
"start": "react-scripts start",
3027
"build": "react-scripts build",
3128
"test": "react-scripts test",

src/components/Barchart.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import React, { Component } from "react";
2-
import {
3-
BarChart,
4-
Bar,
5-
XAxis,
6-
YAxis,
7-
CartesianGrid,
8-
Tooltip,
9-
Legend,
10-
} from "recharts";
2+
import { BarChart, Bar, XAxis, YAxis, Tooltip } from "recharts";
113

124
export default class Barchart extends Component {
135
render() {

src/components/Charts.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import React, { Component } from "react";
2-
import {
3-
LineChart,
4-
Line,
5-
XAxis,
6-
YAxis,
7-
CartesianGrid,
8-
Tooltip,
9-
Legend,
10-
} from "recharts";
2+
import { LineChart, Line, XAxis, YAxis, Tooltip, Legend } from "recharts";
113
import colors from "../constants/colors";
124
import "../styles/Charts.css";
135

src/components/CovidApp.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ class CovidApp extends Component {
119119
</div>
120120
<div className="darkModeButton">
121121
<label className="switch">
122-
<input type="checkbox" onChange={setDarkMode} />
122+
<input
123+
type="checkbox"
124+
onChange={setDarkMode}
125+
checked={isDarkMode}
126+
/>
123127
<span className="slider round"></span>
124128
</label>
125129
</div>

0 commit comments

Comments
 (0)