mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
split into modules
This commit is contained in:
@@ -9,7 +9,7 @@ use Livewire\Component;
|
||||
|
||||
class Header extends Component
|
||||
{
|
||||
public Country $country;
|
||||
public ?Country $country = null;
|
||||
public $currentRouteName;
|
||||
public string $c = 'de';
|
||||
public bool $withGlobe = true;
|
||||
@@ -23,6 +23,11 @@ class Header extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
if (!$this->country) {
|
||||
$this->country = Country::query()
|
||||
->where('code', $this->c)
|
||||
->first();
|
||||
}
|
||||
$this->currentRouteName = Route::currentRouteName();
|
||||
$this->c = $this->country->code;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user