In a previous pull request, I decided to give pages actual URL names instead of just having everything set to "/" but I neglected to consider the dashboard.
I want the dashboard to be the main page so to remain as "/", logic below:
User navigates to "/"
Existing Session/Loggedin? -> Dashboard "/"
Otherwise: Redirect to "/login"
User logs in -> "/account-selection"
User selects an account -> Dashboard "/"
The problem is Index enables routes based on some state logic so routes needs to be raised up a level and nav logic needs to be inside the actual route, so for example "index.ts" has all the routes, then inside "Index" would have the redirection/display logic.
In a previous pull request, I decided to give pages actual URL names instead of just having everything set to "/" but I neglected to consider the dashboard.
I want the dashboard to be the main page so to remain as "/", logic below:
User navigates to "/" Existing Session/Loggedin? -> Dashboard "/" Otherwise: Redirect to "/login"
User logs in -> "/account-selection" User selects an account -> Dashboard "/"
The problem is Index enables routes based on some state logic so routes needs to be raised up a level and nav logic needs to be inside the actual route, so for example "index.ts" has all the routes, then inside "Index" would have the redirection/display logic.