cityofaustin / atd-mobile-signals-work-orders

Mobile Signals Work Orders app using React UI with Knack API
https://mobile-signals.austintexas.io
Other
3 stars 1 forks source link

Fix broken logout button #222

Closed mddilley closed 5 years ago

mddilley commented 5 years ago

This PR fixes a bug where the logout button set the user's knack token cookie to false but did not update isLoggedIn state to false in the App component. Redirect to the login screen depends on this state in the App component (see snippet).https://github.com/cityofaustin/atd-mobile-signals-work-orders/blob/e582df85463bc6c63ac0063e464f820cddce45e7/src/components/App.js#L150

Prior to this change, the knackUserToken cookie would set to false and then no redirect would happen. The logout button now redirects to the login screen once again.