1
+ import React , { Component } from "react" ;
2
+ import axios from "axios" ;
3
+ import Lottie from "react-lottie" ;
4
+ import { formatDistance } from "date-fns" ;
5
+ import { withStyles } from "@material-ui/styles" ;
6
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
1
7
import {
2
8
faBell ,
3
9
faBellSlash ,
4
- faSyncAlt
10
+ faSyncAlt ,
5
11
} from "@fortawesome/free-solid-svg-icons" ;
6
- import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" ;
7
- import { withStyles } from "@material-ui/styles" ;
8
- import axios from "axios" ;
9
- import { formatDistance } from "date-fns" ;
10
- import React , { Component } from "react" ;
11
- import Lottie from "react-lottie" ;
12
- import * as animationData from "../assets/loading.json" ;
13
- import colors from "../constants/colors" ;
14
- import stateCodes from "../constants/stateCodes" ;
15
- import styles from "../styles/CovidAppStyles" ;
16
- import "../styles/DarkModeButton.css" ;
12
+
17
13
import Barchart from "./Barchart" ;
18
14
import Charts from "./Charts" ;
19
15
import DisplayTable from "./DisplayTable" ;
20
16
import Footer from "./Footer" ;
21
17
import MapSection from "./MapSection" ;
22
18
import Overview from "./Overview" ;
23
19
20
+ import colors from "../constants/colors" ;
21
+ import stateCodes from "../constants/stateCodes" ;
22
+ import * as animationData from "../assets/loading.json" ;
23
+
24
+ import styles from "../styles/CovidAppStyles" ;
25
+ import "../styles/DarkModeButton.css" ;
26
+
24
27
const defaultOptions = {
25
28
loop : true ,
26
29
autoplay : true ,
@@ -40,9 +43,9 @@ const months = {
40
43
"07" : "Jul" ,
41
44
"08" : "Aug" ,
42
45
"09" : "Sep" ,
43
- "10" : "Oct" ,
44
- "11" : "Nov" ,
45
- "12" : "Dec" ,
46
+ 10 : "Oct" ,
47
+ 11 : "Nov" ,
48
+ 12 : "Dec" ,
46
49
} ;
47
50
48
51
class CovidApp extends Component {
@@ -144,7 +147,7 @@ class CovidApp extends Component {
144
147
const month = date . slice ( 3 , 5 ) ;
145
148
const time = date . slice ( 11 ) ;
146
149
return `${ day } ${ months [ month ] } , ${ time . slice ( 0 , 5 ) } IST` ;
147
- } catch ( err ) { }
150
+ } catch ( err ) { }
148
151
}
149
152
150
153
render ( ) {
@@ -189,7 +192,7 @@ class CovidApp extends Component {
189
192
</ div >
190
193
) ;
191
194
} ) ;
192
- } catch ( err ) { }
195
+ } catch ( err ) { }
193
196
194
197
return (
195
198
< >
@@ -216,13 +219,13 @@ class CovidApp extends Component {
216
219
onClick = { this . handleNotification }
217
220
/>
218
221
) : (
219
- < div className = { classes . notificationBell } >
220
- < FontAwesomeIcon
221
- icon = { faBell }
222
- onClick = { this . handleNotification }
223
- />
224
- </ div >
225
- ) }
222
+ < div className = { classes . notificationBell } >
223
+ < FontAwesomeIcon
224
+ icon = { faBell }
225
+ onClick = { this . handleNotification }
226
+ />
227
+ </ div >
228
+ ) }
226
229
</ div >
227
230
{ expanded && < div className = { classes . update } > { displayUpdates } </ div > }
228
231
</ div >
0 commit comments