diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-10-26 20:36:37 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-10-26 20:36:37 +0200 |
commit | b162d381fac3873acd65d5399f09c59081e74916 (patch) | |
tree | f32fae0d7e3247fe2fdeeabb34dd0f0fabdf6774 | |
parent | 095ad981db8e11fcda0207eaaad92b80ec9a990d (diff) | |
download | planetwars.dev-b162d381fac3873acd65d5399f09c59081e74916.tar.xz planetwars.dev-b162d381fac3873acd65d5399f09c59081e74916.zip |
hide 'older' link when there is only one page
-rw-r--r-- | web/pw-server/src/routes/matches/index.svelte | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web/pw-server/src/routes/matches/index.svelte b/web/pw-server/src/routes/matches/index.svelte index 9679132..e14d380 100644 --- a/web/pw-server/src/routes/matches/index.svelte +++ b/web/pw-server/src/routes/matches/index.svelte @@ -85,7 +85,8 @@ } function olderMatchesLink(matches: object[]): string { - if (matches.length == 0 || (query["before"] && !hasNext)) { + // sort order is time DESC unless "before" is set + if (matches.length == 0 || (!query["after"] && !hasNext)) { return null; } const lastTimestamp = matches[matches.length - 1]["timestamp"]; |