nowcommunity / nowdatabase

Rebuild of the nowdatabase application for luomus
MIT License
3 stars 1 forks source link

DetailView: Previous button when entered via link #21

Closed ShootingStar91 closed 3 months ago

ShootingStar91 commented 4 months ago

The previous-button of locality detail currently works through react-routers navigate(-1) which corresponds to clicking browsers previous-button.

If user enters this view through direct link, this will either do nothing or throw user to some other page. Likely we want it to bring the user to the table-view, even though the page obviously cannot be known there.

The usual react libraries do not let us access the history stack, so we can't check if the url was the table or not. A solution could be to somehow bring in the information that the view was entered through table, and if not, then instead of navigate(-1) we can navigate to the table view.

ShootingStar91 commented 3 months ago

This was fixed in a big refactor where pagecontext was added and table url handling changed.