kartoza / africa_rangeland_watch

Africa Rangeland Watch (ARW) was designed and developed by Conservation International (CI) and is aimed at monitoring rangeland impact. ARW empowers users to quantify land-use and climate impacts on rangelands over time and space, based on remotely sensed satellite imagery supplemented by ground-based rangeland monitoring.
https://kartoza.github.io/africa_rangeland_watch/
0 stars 1 forks source link

Update PrivateRoute.tsx #112

Open tinashechiraya opened 3 days ago

tinashechiraya commented 3 days ago

this is linked to issue: https://github.com/kartoza/africa_rangeland_watch/issues/86

Screencast from 2024-11-22 12-08-18.webm

dimasciput commented 3 days ago

@tinashechiraya what happens if you in about page, click login, and then cancel the login modal? It should be still in the about page right?

tinashechiraya commented 3 days ago

@dimasciput currently if you cancel it returns to the home page but let me patch it so it stays on current page

tinashechiraya commented 3 days ago

@dimasciput resolved

dimasciput commented 17 hours ago

@tinashechiraya I think it’s a bit weird to show a blank screen and a login modal when a user opens a private url. Maybe it’s better to just redirect them to the home page, show the login modal there, and add a url parameter like next=/map. Just like how Django handles it when you try to access the admin page without being logged in.

For the about page, let’s keep it simple. We don’t need to create a session for every public page. If the login modal is opened from a public page, it should just close the modal when user clicks cancel.