Swetrix / swetrix

Cookieless, open source and privacy-first web analytics service
https://swetrix.com
GNU Affero General Public License v3.0
263 stars 29 forks source link

If the project is located on pagination page > 1, refreshing it's settings will cause an error #271

Open Blaumaus opened 3 months ago

Blaumaus commented 3 months ago

Problem: When opening the 2nd (or more) pagination page in Dashboard, selecting any project's settings and refreshing the page, you are always redirected to Dashboard.

Solution: When refreshing the page, stay on the project settings no matter what. Maybe check the redux state and if the project does not exist there (only the 1st page has been fetched), fetch the project's settings one by one. And only redirect if the project is not accessible after trying to fetch the settings individually.

Demonstration:

https://github.com/Swetrix/swetrix/assets/35810911/b0551ed2-efae-47c7-b82f-c3a9d60b627b