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

Uncaught TypeError: Livewire.components is undefined #167

Open
andhikapepe opened this issue Dec 12, 2023 · 0 comments
Open

Uncaught TypeError: Livewire.components is undefined #167

andhikapepe opened this issue Dec 12, 2023 · 0 comments
Labels
findapr help wanted Extra attention is needed

Comments

@andhikapepe
Copy link

andhikapepe commented Dec 12, 2023

protected $listeners = [
        'sweetalertConfirmed',
        'sweetalertDenied',
];
public function logout()
{
        sweetalert()
            ->timer(0)
            ->showDenyButton()
            ->addInfo('confirm or deny action');
}

public function sweetalertConfirmed(array $payload)
{
        auth()->logout();
        sweetalert()->addSuccess('sweetalert was confirmed');
}

public function sweetalertDenied(array $payload)
{
        sweetalert()->addError('sweetalert was denied');
} 

i have code for laravel 10 and livewire 3 and get Uncaught TypeError: Livewire.components is undefined
when i click button logout, here my button logout:

<a wire:click.prevent="logout" href="#" class="nav_link" data-bs-toggle="tooltip" data-bs-title="Logout">
    <i class='bx bx-log-out nav_icon'></i>
    <span class="nav_name">Logout</span>
</a>

how can fix this code

@yoeunes yoeunes added help wanted Extra attention is needed findapr labels Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
findapr help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants