fix: don't expect teamer data to be available

This commit is contained in:
Björn Fromme
2024-04-04 08:49:05 +02:00
parent a22c3c959a
commit 8030f0b050
+15 -15
View File
@@ -7,21 +7,21 @@
<img class="h-8 w-auto" src="{{ asset('build/images/logo.svg') }}" alt="My E&amp;P Team">
</a>
{% if app.user %}
<div class="flex items-center space-x-4">
{% if app.user.teamer.photo %}
<a href="{{ path('app_teamer_profile_index') }}" title="Mein Profil">
<img src="{{ asset(app.user.teamer.photo.filename | imagine_filter('profile')) }}"
class="h-8 w-auto rounded-full"
alt="{{ app.user.teamer.firstName }}">
</a>
{% endif %}
<button type="button"
class="lg:hidden"
{{ stimulus_controller('mobilenav', [], [], { 'mobilenav': '#mobilenav' }) }}
{{ stimulus_action('mobilenav', 'trigger', null, { 'mode': 'open' }) }}>
{{ icon('menu', 'w-8 h-8 text-gray-700') }}
</button>
</div>
<div class="flex items-center space-x-4">
{% if app.user.teamer and app.user.teamer.photo %}
<a href="{{ path('app_teamer_profile_index') }}" title="Mein Profil">
<img src="{{ asset(app.user.teamer.photo.filename | imagine_filter('profile')) }}"
class="h-8 w-auto rounded-full"
alt="{{ app.user.teamer.firstName }}">
</a>
{% endif %}
<button type="button"
class="lg:hidden"
{{ stimulus_controller('mobilenav', [], [], { 'mobilenav': '#mobilenav' }) }}
{{ stimulus_action('mobilenav', 'trigger', null, { 'mode': 'open' }) }}>
{{ icon('menu', 'w-8 h-8 text-gray-700') }}
</button>
</div>
{% endif %}
</div>
<div class="hidden lg:block">