Skip to content

Commit

Permalink
fix: hopefully last one to fix the url things
Browse files Browse the repository at this point in the history
  • Loading branch information
dually8 committed Mar 30, 2024
1 parent f871b43 commit 540acf6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
try {
const basePath = window.location.origin.includes('github') ? '/nes-cart-browser' : '';
const response = await fetch(`${basePath}/nesCarts.json`);
nesCarts = await response.json();
const _carts = await response.json() as NesCartItem[];
nesCarts = _carts.map((cart) => ({
...cart,
coverPhotoUrl: `${basePath}${cart.coverPhotoUrl}`
}));
} catch (error) {
console.error('Error fetching nesCarts:', error);
} finally {
Expand Down

0 comments on commit 540acf6

Please sign in to comment.