mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-06 10:10:48 +01:00
feat: improve champion role display logic
Added checks for lane and role data to prevent errors when displaying champion roles. (Mel being the first ever champ to launch without this data)
This commit is contained in:
@@ -35,13 +35,17 @@
|
||||
</li>
|
||||
<li class="text-base font-medium leading-loose text-neutral-100 hyphens-auto" lang="en">
|
||||
<span class="font-bold">Popular Positions:</span>
|
||||
@foreach ($champion->lanes->roles as $lane)
|
||||
<span class="inline-block lowercase capitalize-first">{{ $lane }} @svg(getRoleIconSvg($lane), 'w-5 h-5 inline-block')
|
||||
@if (!$loop->last)
|
||||
-
|
||||
@endif
|
||||
</span>
|
||||
@endforeach
|
||||
@if(isset($champion->lanes) && isset($champion->lanes->roles))
|
||||
@foreach ($champion->lanes->roles as $lane)
|
||||
<span class="inline-block lowercase capitalize-first">{{ $lane }} @svg(getRoleIconSvg($lane), 'w-5 h-5 inline-block')
|
||||
@if (!$loop->last)
|
||||
-
|
||||
@endif
|
||||
</span>
|
||||
@endforeach
|
||||
@else
|
||||
<span class="inline-block lowercase capitalize-first">Not Enough Data</span>
|
||||
@endif
|
||||
</li>
|
||||
<li class="items-center text-base font-medium leading-loose text-neutral-100 hyphens-auto"
|
||||
lang="en">
|
||||
|
||||
Reference in New Issue
Block a user