Fixes display of author avatar and league links

Ensures author avatar is only displayed if it exists.

Uses dynamic league IDs from the `spielbetrieb` page in the navbar, which
allows changing the league links in the backend.
This commit is contained in:
2025-09-06 19:03:13 +02:00
parent 7e541e1244
commit 3cf8dc6ed7
5 changed files with 19 additions and 8 deletions
+3 -1
View File
@@ -39,7 +39,9 @@
<?php if ($user = $post->author()->toUser()): ?>
<div class="mt-6 flex border-t border-gray-900/5 pt-6">
<div class="relative flex items-center gap-x-4">
<img src="<?= $user->avatar()->url() ?>" alt="" class="size-10 rounded-full bg-gray-50" />
<?php if ($user->avatar()): ?>
<img src="<?= $user->avatar()->url() ?>" alt="" class="size-10 rounded-full bg-gray-50" />
<?php endif; ?>
<div class="text-sm/6">
<p>
<span class="absolute inset-0"></span>