EthanCloin / financial-forecast

1 stars 0 forks source link

Log Out #3

Closed EthanCloin closed 8 months ago

EthanCloin commented 8 months ago

No current functionality supporting user Log Out

Tasks

EthanCloin commented 8 months ago

Strategy

utilize HTMX attributes on a button to POST to /logout. that endpoint returns a 303 Redirect

Hangup

had some confusion about how to best approach this. I was hoping for a way to just navigate the browser to /login after the POST request was finished, fully reloading the page.

I was hoping to find a way to complete that, since i thought it would be faster and simpler. However, I ultimately arrived at a strategy to replace the current page contents with the HTML response from the Redirect to /login. I accomplished this by pointing the hx-target at a wrapper div.

Screenshot 2024-01-10 at 8 51 29 PM

also i'm not worrying about the navbar, not settled on the final design for the survey pages yet.