When navigating to the page with navigate("/app"), the onClick handlers of elements such as the Delete button do not work, so handleDelete cannot be called.
As one workaround, you can capture the click using a ref and addEventListener, and then call the expected handleDelete logic.
However, this is not a good approach, so we believe another solution is needed.