jamesgeer / conf-twitter-bot

A Twitter Bot to post about academic papers
MIT License
4 stars 0 forks source link

Selecting an account does not redirect user to dashboard #18

Closed jamesgeer closed 2 years ago

jamesgeer commented 2 years ago

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.