diff --git a/src/catalog/internal/handler.go b/src/catalog/internal/handler.go index 2f1c274..44de446 100644 --- a/src/catalog/internal/handler.go +++ b/src/catalog/internal/handler.go @@ -29,7 +29,7 @@ type catalogHandler struct { } func (rh *catalogHandler) GetUpcoming(ctx context.Context, cmd *api.AuctionSearchCriteria) (out *api.GetUpcomingResult, err error) { - page := int(math.Min(1, float64(cmd.GetPage()))) + page := int(math.Max(0, float64(cmd.GetPage()))) pageSize := int(cmd.GetLimit()) if pageSize < 32 { diff --git a/src/web-client/src/routes/+layout.svelte b/src/web-client/src/routes/+layout.svelte index 6b09097..2408911 100644 --- a/src/web-client/src/routes/+layout.svelte +++ b/src/web-client/src/routes/+layout.svelte @@ -1,14 +1,14 @@ {#if hasResults} -

{data?.results.length} of {data?.total} Upcoming & Live Auctions

+
+

{data?.results.length} of {data?.total} Upcoming & Live Auctions

+
    + {#if currentPage > 1} +
  1. <Previous
  2. + {:else} +
  3. + {/if} +
  4. Page {currentPage} of {pageCount}
  5. + {#if currentPage < pageCount} +
  6. Next>
  7. + {/if} +
+