We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f871b43 commit 540acf6Copy full SHA for 540acf6
src/routes/+page.svelte
@@ -29,7 +29,11 @@
29
try {
30
const basePath = window.location.origin.includes('github') ? '/nes-cart-browser' : '';
31
const response = await fetch(`${basePath}/nesCarts.json`);
32
- nesCarts = await response.json();
+ const _carts = await response.json() as NesCartItem[];
33
+ nesCarts = _carts.map((cart) => ({
34
+ ...cart,
35
+ coverPhotoUrl: `${basePath}${cart.coverPhotoUrl}`
36
+ }));
37
} catch (error) {
38
console.error('Error fetching nesCarts:', error);
39
} finally {
0 commit comments