mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-25 04:13:17 +00:00
Fix Livewire routes and upgrade SFC component to Laravel 4
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
<?php
|
||||
|
||||
use function Livewire\Volt\state;
|
||||
use function Livewire\Volt\mount;
|
||||
use Livewire\Component;
|
||||
|
||||
state(['currentRoute' => '']);
|
||||
|
||||
mount(function() {
|
||||
$currentLivewireRouteName = request()->route()->getName();
|
||||
$this->currentRoute = $currentLivewireRouteName;
|
||||
});
|
||||
new class extends Component {
|
||||
public $currentRoute = '';
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$currentLivewireRouteName = request()->route()->getName();
|
||||
$this->currentRoute = $currentLivewireRouteName;
|
||||
}
|
||||
};
|
||||
?>
|
||||
|
||||
<div class="min-w-fit">
|
||||
|
||||
@@ -38,7 +38,7 @@ Route::post('logout', function () {
|
||||
})->name('logout');
|
||||
|
||||
// Association Routes
|
||||
Route::livewire('/association/profile', Profile::name('association.profile'));
|
||||
Route::livewire('/association/profile', Profile::class)->name('association.profile');
|
||||
|
||||
Route::livewire('/association/election', ElectionIndex::class)->name('association.elections');
|
||||
Route::livewire('/association/election/{election:year}', ElectionShow::class)->name('association.election');
|
||||
|
||||
Reference in New Issue
Block a user