Skip to content

Commit

Permalink
fix: fix liveview not re-rendering after button click
Browse files Browse the repository at this point in the history
  • Loading branch information
zvonimirr committed May 11, 2023
1 parent a16967a commit 2f9cebf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/swipex_web/live/profile_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ defmodule SwipexWeb.ProfileLive do
}
)

{:noreply, assign(socket, :potential_match, nil)}
{:noreply, assign(socket, :potential_match, potential_match_id)}
end

def handle_event("dislike", %{"potential-match" => potential_match_id}, socket) do
Expand All @@ -88,7 +88,7 @@ defmodule SwipexWeb.ProfileLive do
}
)

{:noreply, assign(socket, :potential_match, nil)}
{:noreply, assign(socket, :potential_match, potential_match_id)}
end

def render(assigns) do
Expand Down

0 comments on commit 2f9cebf

Please sign in to comment.