Skip to content

Commit 58c105d

Browse files
committed
fix: OrgDashboard
pagination
1 parent 1b18d1f commit 58c105d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/algora_web/live/org/bounties_live.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ defmodule AlgoraWeb.Org.BountiesLive do
351351

352352
socket
353353
|> assign(:bounty_rows, rows ++ to_bounty_rows(more_bounties))
354-
|> assign(:has_more, length(more_bounties) >= page_size())
354+
|> assign(:has_more_bounties, length(more_bounties) >= page_size())
355355
end
356356

357357
defp assign_more_transactions(socket) do

lib/algora_web/live/org/dashboard_live.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
7373
|> assign(:contributors, contributors)
7474
|> assign(:developers, contributors |> Enum.map(& &1.user) |> Enum.concat(experts))
7575
|> assign(:has_more_bounties, false)
76+
|> assign(:has_more_transactions, false)
7677
|> assign(:oauth_url, Github.authorize_url(%{socket_id: socket.id}))
7778
|> assign(:bounty_form, to_form(BountyForm.changeset(%BountyForm{}, %{})))
7879
|> assign(:tip_form, to_form(TipForm.changeset(%TipForm{}, %{})))
@@ -867,9 +868,9 @@ defmodule AlgoraWeb.Org.DashboardLive do
867868
defp to_transaction_rows(transactions), do: transactions
868869

869870
defp assign_more_bounties(socket) do
870-
%{rows: rows, current_org: current_org} = socket.assigns
871+
%{bounty_rows: rows, current_org: current_org} = socket.assigns
871872

872-
last_bounty = List.last(rows).bounty
873+
last_bounty = List.last(rows)
873874

874875
cursor = %{
875876
inserted_at: last_bounty.inserted_at,
@@ -887,7 +888,7 @@ defmodule AlgoraWeb.Org.DashboardLive do
887888

888889
socket
889890
|> assign(:bounty_rows, rows ++ to_bounty_rows(more_bounties))
890-
|> assign(:has_more, length(more_bounties) >= page_size())
891+
|> assign(:has_more_bounties, length(more_bounties) >= page_size())
891892
end
892893

893894
defp assign_more_transactions(socket) do

0 commit comments

Comments
 (0)