Notification action not working

        Notification::make()
            ->title('Copy your token')
            ->body('Make sure to copy your new token now. You won\'t be able to see it again.')
            ->persistent()
            ->success()
            ->actions([
                Action::make('copy')
                    ->button()
                    ->icon('heroicon-o-clipboard-document')
                    ->action(function ($livewire) use ($plainTextToken) {
                        dd($plainTextToken);
                        ray('plainTextToken', $plainTextToken);
                        $livewire->js(
                            'window.navigator.clipboard.writeText("' . $plainTextToken . '");
                            $tooltip("' . __('Copied to clipboard') . '", { timeout: 1500 });'
                        );
                    }),
            ])
            ->send();


Nothing get's executed when the button is clicked, does anyone know why?
Was this page helpful?