fix: improve API error handling, add fallback UI, and optimize Nginx connection settings
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
@if($rate)
|
||||
<div class="card">
|
||||
<div class="title">
|
||||
|
||||
@@ -5,10 +6,10 @@
|
||||
|
||||
{{$currencyName}}
|
||||
</p>
|
||||
<p class="percent" style="color: {{ $rate['Change'] > 0 ? 'green' : '#B9101E' }}">
|
||||
{{ $rate['Change'] }}%
|
||||
<p class="percent" style="color: {{ ($rate['Change'] ?? 0) > 0 ? 'green' : '#B9101E' }}">
|
||||
{{ $rate['Change'] ?? 0 }}%
|
||||
</p>
|
||||
@if($rate['Change'] > 0)
|
||||
@if(($rate['Change'] ?? 0) > 0)
|
||||
<svg width="20" height="20" fill="green" style="position: relative; top: -2px;" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg" transform="rotate(180)"> <path d="M384 576q0-26 19-45t45-19h896q26 0 45 19t19 45-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45z"></path> </svg>
|
||||
@else
|
||||
<svg width="20" height="20" fill="#B9101E" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <path d="M384 576q0-26 19-45t45-19h896q26 0 45 19t19 45-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45z"></path> </svg>
|
||||
@@ -19,12 +20,13 @@
|
||||
<div class="data">
|
||||
<p>
|
||||
|
||||
{{$rate['Selling']}} ₺
|
||||
{{$rate['Selling'] ?? '0.00'}} ₺
|
||||
</p>
|
||||
|
||||
<div class="range">
|
||||
<div class="fill" style="background-color: {{ $rate['Change'] > 0 ? 'green' : '#B9101E' }};">
|
||||
<div class="fill" style="background-color: {{ ($rate['Change'] ?? 0) > 0 ? 'green' : '#B9101E' }};">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
Reference in New Issue
Block a user