fix: prevent back-button trap on device show page
push_patch without replace: true created a history entry loop: /devices/:id → /devices/:id?tab=overview, so hitting back would immediately redirect forward again, trapping the user.
This commit is contained in:
parent
02f1af6fe3
commit
f106d4c801
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ defmodule ToweropsWeb.DeviceLive.Show do
|
|||
{:noreply, socket}
|
||||
else
|
||||
# Redirect to add default tab to URL
|
||||
{:noreply, push_patch(socket, to: ~p"/devices/#{id}?tab=overview")}
|
||||
{:noreply, push_patch(socket, to: ~p"/devices/#{id}?tab=overview", replace: true)}
|
||||
end
|
||||
|
||||
{:error, :not_found} ->
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue