Closed jeffzheng13 closed 7 months ago
Some findings after testing
- Try logging in, the GoogleMap weirdly doesn't have the bottom nav bar? I don't know where this issue is because if you refresh the page then after you've logged in the nav bar appears correctly. It works fine from all other routes in the app, just when logging in is it an issue.
this actually could be a bug i created since it seems to be with the HomePage. but lmk if you can recreate it
Yep, I'm pretty this stems from logging out and then logging back in. I mentioned this issue in #45, where we should just move the sign out button into profile page. Otherwise, when you click the button it performs the log out logic, but the nav bar has its own logic where for ontabchanged. Because of this ontabchanged runs setstate, but because log out logic runs first, the user has already been taken to the login page and the nav bar widget has disappeared already, but the setstate will still run causing an error as the nav bar widget doesn't exist anymore but you are trying to rebuild it with setstate.
Some findings after testing
- Try logging in, the GoogleMap weirdly doesn't have the bottom nav bar? I don't know where this issue is because if you refresh the page then after you've logged in the nav bar appears correctly. It works fine from all other routes in the app, just when logging in is it an issue.
this actually could be a bug i created since it seems to be with the HomePage. but lmk if you can recreate it
Yep, I'm pretty this stems from logging out and then logging back in. I mentioned this issue in #45, where we should just move the sign out button into profile page. Otherwise, when you click the button it performs the log out logic, but the nav bar has its own logic where for ontabchanged. Because of this ontabchanged runs setstate, but because log out logic runs first, the user has already been taken to the login page and the nav bar widget has disappeared already, but the setstate will still run causing an error as the nav bar widget doesn't exist anymore but you are trying to rebuild it with setstate.
Update: I just inspected the widget tree, it happens anytime you log in. For some reason it creates a new map widget, that is layered on top. The nav bar is hidden underneath. Still investigating for a solution.
Some findings after testing
- Try logging in, the GoogleMap weirdly doesn't have the bottom nav bar? I don't know where this issue is because if you refresh the page then after you've logged in the nav bar appears correctly. It works fine from all other routes in the app, just when logging in is it an issue.
this actually could be a bug i created since it seems to be with the HomePage. but lmk if you can recreate it
Issue resolved. It had to do with the LoginPage routing to MapPage() after logging in. Basically didn't need to route anymore since the Provider would pick up that the user has been logged in and the Wrapper would put you in the right place. Also added an AuthenticatePage(). This allows our login and signup page to fall under wrapper widget. Essentially makes everything get picked up by provider.
Changes
Notes