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
|
<?php
|
||||||
|
|
||||||
use function Livewire\Volt\state;
|
use Livewire\Component;
|
||||||
use function Livewire\Volt\mount;
|
|
||||||
|
|
||||||
state(['currentRoute' => '']);
|
new class extends Component {
|
||||||
|
public $currentRoute = '';
|
||||||
mount(function() {
|
|
||||||
$currentLivewireRouteName = request()->route()->getName();
|
|
||||||
$this->currentRoute = $currentLivewireRouteName;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
public function mount(): void
|
||||||
|
{
|
||||||
|
$currentLivewireRouteName = request()->route()->getName();
|
||||||
|
$this->currentRoute = $currentLivewireRouteName;
|
||||||
|
}
|
||||||
|
};
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="min-w-fit">
|
<div class="min-w-fit">
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Route::post('logout', function () {
|
|||||||
})->name('logout');
|
})->name('logout');
|
||||||
|
|
||||||
// Association Routes
|
// 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', ElectionIndex::class)->name('association.elections');
|
||||||
Route::livewire('/association/election/{election:year}', ElectionShow::class)->name('association.election');
|
Route::livewire('/association/election/{election:year}', ElectionShow::class)->name('association.election');
|
||||||
|
|||||||
Reference in New Issue
Block a user