split into modules

This commit is contained in:
Benjamin Takats
2022-12-12 16:21:10 +01:00
parent 8406fe6dd2
commit d8f66f61f3
35 changed files with 259 additions and 309 deletions

View File

@@ -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;
}