Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 2, 2022
Merged

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

merged 1 commit into from
Mar 2, 2022

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