57 |
58 |
59 | {
62 | switch (actionValue) {
63 | case 0:
64 | history.push('/world');
65 | break;
66 | case 1:
67 | history.push('/dashboard');
68 | break;
69 | case 2:
70 | history.push('/infection-trajectories');
71 | break;
72 | }
73 | }}
74 | showLabels
75 | style={{ width: '100%' }}
76 | color={theme.palette.secondary.main}
77 | >
78 | }
82 | />
83 | }
87 | />
88 | }
92 | />
93 |
94 |
95 |
96 | );
97 | };
98 |
99 | export default BottomNavigationBar;
100 |
--------------------------------------------------------------------------------
/src/data/allstates.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "AL",
4 | "val": "01"
5 | },
6 | {
7 | "id": "AK",
8 | "val": "02"
9 | },
10 | {
11 | "id": "AS",
12 | "val": "60"
13 | },
14 | {
15 | "id": "AZ",
16 | "val": "04"
17 | },
18 | {
19 | "id": "AR",
20 | "val": "05"
21 | },
22 | {
23 | "id": "CA",
24 | "val": "06"
25 | },
26 | {
27 | "id": "CO",
28 | "val": "08"
29 | },
30 | {
31 | "id": "CT",
32 | "val": "09"
33 | },
34 | {
35 | "id": "DE",
36 | "val": "10"
37 | },
38 | {
39 | "id": "DC",
40 | "val": "11"
41 | },
42 | {
43 | "id": "FL",
44 | "val": "12"
45 | },
46 | {
47 | "id": "FM",
48 | "val": "64"
49 | },
50 | {
51 | "id": "GA",
52 | "val": "13"
53 | },
54 | {
55 | "id": "GU",
56 | "val": "66"
57 | },
58 | {
59 | "id": "HI",
60 | "val": "15"
61 | },
62 | {
63 | "id": "ID",
64 | "val": "16"
65 | },
66 | {
67 | "id": "IL",
68 | "val": "17"
69 | },
70 | {
71 | "id": "IN",
72 | "val": "18"
73 | },
74 | {
75 | "id": "IA",
76 | "val": "19"
77 | },
78 | {
79 | "id": "KS",
80 | "val": "20"
81 | },
82 | {
83 | "id": "KY",
84 | "val": "21"
85 | },
86 | {
87 | "id": "LA",
88 | "val": "22"
89 | },
90 | {
91 | "id": "ME",
92 | "val": "23"
93 | },
94 | {
95 | "id": "MH",
96 | "val": "68"
97 | },
98 | {
99 | "id": "MD",
100 | "val": "24"
101 | },
102 | {
103 | "id": "MA",
104 | "val": "25"
105 | },
106 | {
107 | "id": "MI",
108 | "val": "26"
109 | },
110 | {
111 | "id": "MN",
112 | "val": "27"
113 | },
114 | {
115 | "id": "MS",
116 | "val": "28"
117 | },
118 | {
119 | "id": "MO",
120 | "val": "29"
121 | },
122 | {
123 | "id": "MT",
124 | "val": "30"
125 | },
126 | {
127 | "id": "NE",
128 | "val": "31"
129 | },
130 | {
131 | "id": "NV",
132 | "val": "32"
133 | },
134 | {
135 | "id": "NH",
136 | "val": "33"
137 | },
138 | {
139 | "id": "NJ",
140 | "val": "34"
141 | },
142 | {
143 | "id": "NM",
144 | "val": "35"
145 | },
146 | {
147 | "id": "NY",
148 | "val": "36"
149 | },
150 | {
151 | "id": "NC",
152 | "val": "37"
153 | },
154 | {
155 | "id": "ND",
156 | "val": "38"
157 | },
158 | {
159 | "id": "MP",
160 | "val": "69"
161 | },
162 | {
163 | "id": "OH",
164 | "val": "39"
165 | },
166 | {
167 | "id": "OK",
168 | "val": "40"
169 | },
170 | {
171 | "id": "OR",
172 | "val": "41"
173 | },
174 | {
175 | "id": "PW",
176 | "val": "70"
177 | },
178 | {
179 | "id": "PA",
180 | "val": "42"
181 | },
182 | {
183 | "id": "PR",
184 | "val": "72"
185 | },
186 | {
187 | "id": "RI",
188 | "val": "44"
189 | },
190 | {
191 | "id": "SC",
192 | "val": "45"
193 | },
194 | {
195 | "id": "SD",
196 | "val": "46"
197 | },
198 | {
199 | "id": "TN",
200 | "val": "47"
201 | },
202 | {
203 | "id": "TX",
204 | "val": "48"
205 | },
206 | {
207 | "id": "UM",
208 | "val": "74"
209 | },
210 | {
211 | "id": "UT",
212 | "val": "49"
213 | },
214 | {
215 | "id": "VT",
216 | "val": "50"
217 | },
218 | {
219 | "id": "VA",
220 | "val": "51"
221 | },
222 | {
223 | "id": "VI",
224 | "val": "78"
225 | },
226 | {
227 | "id": "WA",
228 | "val": "53"
229 | },
230 | {
231 | "id": "WV",
232 | "val": "54"
233 | },
234 | {
235 | "id": "WI",
236 | "val": "55"
237 | },
238 | {
239 | "id": "WY",
240 | "val": "56"
241 | }
242 | ]
--------------------------------------------------------------------------------
/src/components/Share.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import Grid from '@material-ui/core/Grid';
3 | import Title from 'components/Dashboard/Title';
4 | import Paper from '@material-ui/core/Paper';
5 | import Card from '@material-ui/core/Card';
6 | import Typography from '@material-ui/core/Typography';
7 | import makeStyles from '@material-ui/core/styles/makeStyles';
8 | import useTheme from '@material-ui/core/styles/useTheme';
9 | import useDataStore from '../data/dataStore';
10 | import GitHubIcon from '@material-ui/icons/GitHub';
11 | import ButtonBase from '@material-ui/core/ButtonBase';
12 | import Divider from '@material-ui/core/Divider';
13 | import clsx from 'clsx';
14 | import { GLOBAL_PAPER_OPACITY } from '../utils/consts';
15 | import { useLocation } from 'react-router-dom';
16 | import {
17 | FacebookShareButton,
18 | FacebookIcon,
19 | LinkedinShareButton,
20 | LinkedinIcon,
21 | WhatsappShareButton,
22 | WhatsappIcon,
23 | } from 'react-share';
24 |
25 | const useStyles = makeStyles((theme) => ({
26 | paper: {
27 | opacity: `${GLOBAL_PAPER_OPACITY} !important`,
28 | padding: theme.spacing(2),
29 | display: 'flex',
30 | overflow: 'visible',
31 | flexDirection: 'column',
32 | '&.btn': {
33 | flexDirection: 'row-reverse',
34 | justifyContent: 'space-around',
35 | paddingLeft: '25%',
36 | paddingRight: '25%',
37 | },
38 | },
39 | shareButton: {
40 | opacity: 1,
41 | '&:hover': {
42 | color: `${theme.palette.secondary.main} !important`,
43 | },
44 | },
45 | }));
46 | const Share = () => {
47 | const classes = useStyles();
48 | const theme = useTheme();
49 | const dataStore = useDataStore();
50 | const location = useLocation();
51 | if (!dataStore.ready) {
52 | return null;
53 | }
54 | return (
55 |