Closed angela-tran closed 5 months ago
We figured out that the strange behavior seen when using window.location.replace
was due to the way our phases work. replace
is working correctly in removing the current location from the history.
The strange Back button behavior is because when the user is taken back from /enrollment/error
to /eligibility/confirm
, the confirm
view will see that the user is already eligible and redirect them along to the /enrollment
. replace
then removes /eligibility/confirm
from the history, making it so on going "Back" a second time, the user is taken to /eligibility/start
. We decided assign
is the correct method to use - it gives a consistent experience, and the looping from /enrollment/error
to /enrollment
is the correct behavior.
_Originally posted by @thekaveman in https://github.com/cal-itp/benefits/pull/2089#discussion_r1610342063_