Skip to content

Commit

Permalink
💄 ensure all svelte routes pass the linter (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdhoffa authored Dec 2, 2024
1 parent f0b884e commit 9a28e94
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/routes/company_view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { techexposure_company } from '../js/techexposure_company.js';
import { createErrorMessageDiv } from '../js/createErrorMessageDiv.js';
import * as d3 from 'd3';
import { union } from 'd3-array';
onMount(async () => {
const exposureStatsDataResponse = await fetch('data/data_exposure_stats.json');
Expand Down
7 changes: 7 additions & 0 deletions src/routes/portfolio_view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { PieExploded } from '../js/pie_exploded.js';
import { techexposure } from '../js/techexposure';
import { tabulateIntoIncludedTable } from '../js/included_table.js';
import { createErrorMessageDiv } from '../js/createErrorMessageDiv.js';
onMount(async () => {
const tableDataResponse = await fetch('data/data_included_table.json');
Expand Down Expand Up @@ -34,6 +35,7 @@
"of assets' value covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching value pie for bonds', err);
document.querySelector('#valuePieBonds').innerHTML = '';
document.querySelector('#valuePieBonds').appendChild(createErrorMessageDiv());
}
Expand All @@ -45,6 +47,7 @@
"of assets' value covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching value pie for equity', err);
document.querySelector('#valuePieEquity').innerHTML = '';
document.querySelector('#valuePieEquity').appendChild(createErrorMessageDiv());
}
Expand All @@ -59,6 +62,7 @@
"of assets' emissions covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching emissions pie for bonds', err);
document.querySelector('#emissionsPieBonds').innerHTML = '';
document.querySelector('#emissionsPieBonds').appendChild(createErrorMessageDiv());
}
Expand All @@ -70,6 +74,7 @@
"of assets' emissions covered by PACTA sectors"
);
} catch (err) {
console.error('Error fetching emissions pie for equity', err);
document.querySelector('#emissionsPieEquity').innerHTML = '';
document.querySelector('#emissionsPieEquity').appendChild(createErrorMessageDiv());
}
Expand All @@ -85,6 +90,7 @@
techOrder
);
} catch (err) {
console.error('Error fetching techmix for bonds', err);
document.querySelector('#techMixAllBonds').innerHTML = '';
document.querySelector('#techMixAllBonds').appendChild(createErrorMessageDiv());
}
Expand All @@ -97,6 +103,7 @@
techOrder
);
} catch (err) {
console.error('Error fetching techmix for equity', err);
document.querySelector('#techMixAllEquity').innerHTML = '';
document.querySelector('#techMixAllEquity').appendChild(createErrorMessageDiv());
}
Expand Down
5 changes: 4 additions & 1 deletion src/routes/sector_view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { time_line } from '../js/time_line.js';
import { createErrorMessageDiv } from '../js/createErrorMessageDiv.js';
import * as d3 from 'd3';
import { union } from 'd3-array';
onMount(async () => {
const exposureStatsDataResponse = await fetch('data/data_exposure_stats.json');
Expand All @@ -26,6 +25,7 @@
try {
new ExposureStatsTile(document.querySelector('#exposure-stats'), exposureStatsData);
} catch (err) {
console.error('Error fetching exposure stats: ', err);
document.querySelector('#exposure-stats').innerHTML = '';
document.querySelector('#exposure-stats').appendChild(createErrorMessageDiv());
}
Expand All @@ -35,6 +35,7 @@
try {
new techmix_sector(document.querySelector('#techmix-plot'), techmixData);
} catch (err) {
console.error('Error fetching techmix: ', err);
document.querySelector('#techmix-plot').innerHTML = '';
document.querySelector('#techmix-plot').appendChild(createErrorMessageDiv());
}
Expand All @@ -51,6 +52,7 @@
document.querySelector('#trajectory-box').classList.add('hidden');
}
} catch (err) {
console.error('Error fetching trajectory alignment: ', err);
document.querySelector('#trajectory-box').innerHTML = '';
document.querySelector('#trajectory-box').appendChild(createErrorMessageDiv());
}
Expand All @@ -60,6 +62,7 @@
try {
new time_line(document.querySelector('#emission-intensity-plot'), emissionsData);
} catch (err) {
console.error('Error fetching emission intensity plot: ', err);
document.querySelector('#emission-intensity-plot').innerHTML = '';
document.querySelector('#emission-intensity-plot').appendChild(createErrorMessageDiv());
}
Expand Down

0 comments on commit 9a28e94

Please sign in to comment.