🛠️ Refactor Blade views for Livewire component consistency, streamline login view, and improve key usage across components

- Replaced `state` and `computed` with `Livewire\Component` implementations in `language/selector.blade.php` for enhanced maintainability.
- Adjusted `login.blade.php` syntax for dynamic href generation and removed commented-out sign-up link.
- Added unique `wire:key` attributes to iterable elements for enhanced performance and reactivity.
- Simplified controller routing and corrected indentation in `web.php`, improving clarity.
This commit is contained in:
HolgerHatGarKeineNode
2026-01-17 17:07:15 +01:00
parent eebe453f5a
commit 4c0d387692
5 changed files with 80 additions and 81 deletions

View File

@@ -20,6 +20,8 @@ class extends Component {
{
if (!auth()->check()) {
$this->redirectRoute('login');
return;
}
$this->country = request()->route('country', config('app.domain_country'));
}
@@ -90,7 +92,7 @@ class extends Component {
<flux:separator class="my-4"/>
<div class="space-y-3">
@foreach($myUpcomingEvents as $event)
<a href="{{ route('meetups.landingpage-event', ['meetup' => $event->meetup->slug, 'event' => $event->id, 'country' => $event->meetup->city->country->code]) }}"
<a wire:key="event-{{ $event->id }}" href="{{ route('meetups.landingpage-event', ['meetup' => $event->meetup->slug, 'event' => $event->id, 'country' => $event->meetup->city->country->code]) }}"
class="block hover:bg-zinc-50 dark:hover:bg-zinc-800 rounded-lg p-3 -m-3 transition-colors">
<div class="flex items-start justify-between gap-3">
<flux:avatar size="xl" :src="$event->meetup->getFirstMediaUrl('logo', 'thumb')"/>