diff --git a/web/pw-server/src/routes/bots/[bot_name].svelte b/web/pw-server/src/routes/bots/[bot_name].svelte index cf8c42a..99278df 100644 --- a/web/pw-server/src/routes/bots/[bot_name].svelte +++ b/web/pw-server/src/routes/bots/[bot_name].svelte @@ -5,7 +5,7 @@ const apiClient = new ApiClient(fetch); try { - const [botData, matches] = await Promise.all([ + const [botData, matchesPage] = await Promise.all([ apiClient.get(`/api/bots/${params["bot_name"]}`), apiClient.get("/api/matches", { bot: params["bot_name"], count: "20" }), ]); @@ -19,7 +19,7 @@ bot, owner, versions, - matches, + matches: matchesPage["matches"], }, }; } catch (error) { diff --git a/web/pw-server/src/routes/matches/index.svelte b/web/pw-server/src/routes/matches/index.svelte index 8de375b..3ae6603 100644 --- a/web/pw-server/src/routes/matches/index.svelte +++ b/web/pw-server/src/routes/matches/index.svelte @@ -15,7 +15,7 @@ bot: botName, }; - let matches = await apiClient.get("/api/matches", removeUndefined(query)); + let { matches, has_next } = await apiClient.get("/api/matches", removeUndefined(query)); // TODO: should this be done client-side? if (query["after"]) { @@ -26,6 +26,8 @@ props: { matches, botName, + hasNext: has_next, + query, }, }; } catch (error) { @@ -47,12 +49,13 @@