fixed some navigation issues

This commit is contained in:
roormonger
2026-03-23 17:09:47 -04:00
parent f6ae56c848
commit 4e0b510d7f
5 changed files with 43 additions and 16 deletions

View File

@@ -112,15 +112,14 @@ export const rommApiClient = {
},
async fetchRecentGames(): Promise<Game[]> {
// Ordering by internal id desc is functionally identical to created_at logic natively
const res = await fetch(`${this.apiBase}/roms?limit=20&order_by=id&order_dir=desc`, { headers: this.headers });
const res = await fetch(`${this.apiBase}/roms?limit=50&order_by=id&order_dir=desc`, { headers: this.headers });
if (!res.ok) throw new Error('Failed to fetch recents.');
const json = await res.json();
return json.items ? json.items.map(mapRomToGame) : [];
},
async fetchFavorites(): Promise<Game[]> {
const res = await fetch(`${this.apiBase}/roms?favorite=true&limit=20`, { headers: this.headers });
const res = await fetch(`${this.apiBase}/roms?favorite=true&limit=50`, { headers: this.headers });
if (!res.ok) throw new Error('Failed to fetch favorites.');
const json = await res.json();
return json.items ? json.items.map(mapRomToGame) : [];