Skip to content

Commit 27ae41c

Browse files
committed
clean up the unnecessary code
1 parent 497dd3e commit 27ae41c

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

project/app.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,13 @@ async function handleListClick(event) {
8686
selectedId,
8787
'confirmed',
8888
);
89-
console.log(confirmedResponse);
9089
endLoadingAnimation();
9190
setDeathsList(deathResponse);
9291
setTotalDeathsByCountry(deathResponse);
9392
setRecoveredList(recoveredResponse);
9493
setTotalRecoveredByCountry(recoveredResponse);
9594
setChartData(confirmedResponse);
9695
isDeathLoading = false;
97-
// console.log(data);
9896
}
9997

10098
function setDeathsList(data) {
@@ -159,33 +157,20 @@ function endLoadingAnimation() {
159157
recoveredList.removeChild(recoveredSpinner);
160158
}
161159

162-
//
163160
async function setupData() {
164161
const { data } = await fetchCovidSummary();
165-
console.log(data);
166162
setTotalConfirmedNumber(data);
167163
setTotalDeathsByWorld(data);
168164
setTotalRecoveredByWorld(data);
169165
setCountryRanksByConfirmedCases(data);
170166
setLastUpdatedTimestamp(data);
171-
// renderChart();
172167
}
173168

174169
function renderChart(data, labels) {
175170
var ctx = $('#lineChart').getContext('2d');
176-
const defaultLabel = [
177-
'January',
178-
'February',
179-
'March',
180-
'April',
181-
'May',
182-
'June',
183-
'July',
184-
];
185-
const defaultData = [0, 10, 5, 2, 20, 30, 45];
186171
Chart.defaults.global.defaultFontColor = '#f5eaea';
187172
Chart.defaults.global.defaultFontFamily = 'Exo 2';
188-
var chart = new Chart(ctx, {
173+
new Chart(ctx, {
189174
type: 'line',
190175
data: {
191176
labels,

0 commit comments

Comments
 (0)