🛠️ Refactor dashboard components for improved code formatting and readability

- Updated HTML indentation and alignment across `top-countries`, `activities`, and `top-meetups` components.
- Applied consistent formatting to dynamic content (e.g., map links, charts).
- Corrected key usage in `NostrTrait` for route parameters related to `meetups`.
This commit is contained in:
HolgerHatGarKeineNode
2025-11-24 18:06:11 +01:00
parent 54f79309dc
commit aee1194e2f
4 changed files with 27 additions and 23 deletions

View File

@@ -68,7 +68,7 @@ trait NostrTrait
$model->start->asDateTime(),
$model->location,
url()->route('meetups.landingpage-event',
['country' => str(session('lang_country', 'de'))->after('-')->lower(), 'meetup' => $model, 'event' => $model]),
['country' => str(session('lang_country', 'de'))->after('-')->lower(), 'meetup' => $model->meetup, 'event' => $model]),
str($model->meetup->slug)->replace('-', '_'),
);
}

View File

@@ -22,7 +22,10 @@ class extends Component {
->get();
// Kombiniere und sortiere Activities
$activities = collect($recentMeetups->map(fn($m) => ['type' => 'meetup', 'data' => $m, 'created_at' => $m->created_at]))
$activities = collect($recentMeetups->map(fn($m)
=> [
'type' => 'meetup', 'data' => $m, 'created_at' => $m->created_at,
]))
->merge($recentEvents->map(fn($e) => ['type' => 'event', 'data' => $e, 'created_at' => $e->created_at]))
->sortByDesc('created_at')
->take(10);

View File

@@ -91,7 +91,8 @@ class extends Component {
<flux:separator class="my-4"/>
<div class="space-y-3">
@foreach($topCountries as $country)
<div class="flex items-center justify-between gap-3 p-2 hover:bg-zinc-50 dark:hover:bg-zinc-800 rounded-lg transition-colors">
<div
class="flex items-center justify-between gap-3 p-2 hover:bg-zinc-50 dark:hover:bg-zinc-800 rounded-lg transition-colors">
<a href="{{ route('meetups.map', ['country' => $country->code]) }}">
<div class="flex items-center gap-3 flex-1">
<img alt="{{ $country->code }}"