mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-14 12:15:22 +00:00
Cleanup previous/next page buttons (#134)
Use noteq to simplify code, add current page to previous/next page bar Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/134 Reviewed-by: orangix <orangix@noreply.codeberg.org> Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co> Co-committed-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
This commit is contained in:
committed by
video-prize-ranch
parent
0fea1e46a3
commit
fc88bfbca5
@@ -36,11 +36,6 @@ func HandleTrending(c *fiber.Ctx) error {
|
||||
sort = "popular"
|
||||
}
|
||||
|
||||
displayPrevPage := true
|
||||
if page == "1" {
|
||||
displayPrevPage = false
|
||||
}
|
||||
|
||||
results, err := ApiClient.FetchTrending(section, sort, page)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -51,7 +46,6 @@ func HandleTrending(c *fiber.Ctx) error {
|
||||
"section": section,
|
||||
"sort": sort,
|
||||
"page": pageNumber,
|
||||
"displayPrev": displayPrevPage,
|
||||
"nextPage": pageNumber + 1,
|
||||
"prevPage": pageNumber - 1,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user