LiveWire Redirect

I have a menuitem which invokes a livewire component.
That component does some logic and redirects them back to the main dashboard.

The redirect is not working, not sure what the issue is.

<?php

namespace App\Livewire;

use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redirect;
use Livewire\Component;

class SwitchTeam extends Component 
{
    public $tenant;
    public $team;
    public function store() {
        Log::info($this->tenant . " - " . $this->team);
        
    }

    public function render()
    {

        Log::info($this->tenant . " - " . $this->team);
        
        // Other Logic ....

        return $this->redirect(route('filament.app.pages.dashboard', ['tenant' => $this->tenant]));
    }
}

Not sure if there is a better way to invoke a livewire component or specific method from an MenuItem. Ultimately I need to invoke some logic from a menuitem. I believe this is a issue with redirects in the render method. However I am at a loss to understand the best way to accomplish this.
Was this page helpful?