Skip to content

Commit 8601c4d

Browse files
committed
clean up the unnecessary code and update the stylesheets for the final project
1 parent da9920c commit 8601c4d

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
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,

project/main.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ header > h1 {
123123
font-size: 1.125rem;
124124
font-weight: 750;
125125
padding: 0 0.7rem;
126-
width: 70px;
126+
width: 98px;
127127
}
128128
.country {
129129
font-size: 1.125rem;
@@ -166,14 +166,14 @@ header > h1 {
166166
padding: 0 0.4rem;
167167
font-size: 1.125rem;
168168
font-weight: 550;
169-
width: 70px;
169+
width: 84px;
170170
color: white;
171171
}
172172
.list-item-b > .recovered {
173173
padding: 0 0.4rem;
174174
font-size: 1.125rem;
175175
font-weight: 550;
176-
width: 70px;
176+
width: 84px;
177177
}
178178
.recovered-container {
179179
margin-left: 1rem;

0 commit comments

Comments
 (0)