This PR introduce a resolver instead of a guard for post-detail/post-edit view. In this way, we can still check the permissions and also reuse the post-object in the components, and in that way removing an unneccessary call to the API that slowed down the opening of the post.
To test:
Go to feed-view
Click on a post
[ ] The post should open (but faster!!)
Click on the pen on the post
[ ] The edit-view should open with the correct info (but faster!!)
Test all kinds of actions, changing status, adding to collections etc etc, they should all work and be reflected in the UI
Test on small screens and on the map, the modal should open and all functionality should work as before
Test accessing the edit-url as a logged out user
[ ] You should get redirected to the "not found" url
Test accessing a post under review as a logged out user
[ ] You should get redirected to the "not found" url
This PR introduce a resolver instead of a guard for post-detail/post-edit view. In this way, we can still check the permissions and also reuse the post-object in the components, and in that way removing an unneccessary call to the API that slowed down the opening of the post. To test:
Note: While testing this, I found an existing bug in the mapview: https://linear.app/ushahidi/issue/USH-1677/changing-status-on-a-post-in-map-view-doesnt-update-the-ui-to-reflect I have not fixed that in this PR.