Skip to content

Use Alpine's @click.prevent for log out#989

Merged
taylorotwell merged 1 commit intolaravel:2.xfrom
kastsecho:alpine-logout
Mar 2, 2022
Merged

Use Alpine's @click.prevent for log out#989
taylorotwell merged 1 commit intolaravel:2.xfrom
kastsecho:alpine-logout

Conversation

@jrd-lewis
Copy link
Contributor

This PR will switch the Log Out links in the Livewire navigation menu component from vanilla JS to Alpine's @click.prevent directive for a cleaner approach with the same result. Also, it should eliminate squawking from IDE's about using the event context when preventing the default action on clicking the links.

@taylorotwell taylorotwell merged commit b30740f into laravel:2.x Mar 2, 2022
@taylorotwell
Copy link
Member

Clean - thanks.

@jrd-lewis jrd-lewis deleted the alpine-logout branch March 2, 2022 14:25
@mikemand
Copy link

mikemand commented Mar 3, 2022

This would also be great for the switchable-team component. @jrd-lewis, do you want to PR it or shall I?

@jrd-lewis
Copy link
Contributor Author

@mikemand Good catch. I hadn't noticed that there was another component was using the same approach as this. I could make a PR later today for it to be consistent with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants