Skip to content

Commit

Permalink
Merge pull request #19 from pepsico-ecommerce/dob/pagination-zero-pages
Browse files Browse the repository at this point in the history
Do not show pagination when there are zero total pages
  • Loading branch information
ottobar authored Nov 12, 2021
2 parents dbd5643 + 4773c2e commit 3378729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/pagination.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule CrunchBerry.Components.Pagination do
@impl Phoenix.LiveComponent
def render(assigns) do
~H"""
<%= unless @page.total_pages == 1 do %>
<%= unless @page.total_pages <= 1 do %>
<nav aria-label={@name}>
<ul class={@classes[:list]}>
<%= if @page.page_number > 1 do %>
Expand Down

0 comments on commit 3378729

Please sign in to comment.