mirror of
https://github.com/jcreek/SvelteKitSaasBoilerplate.git
synced 2026-07-14 11:33:49 +00:00
refactor(#59): Verify that 'transactions' is always defined before iteration
This commit is contained in:
@@ -106,24 +106,26 @@
|
|||||||
<section class="space-y-4">
|
<section class="space-y-4">
|
||||||
<h2 class="text-xl font-semibold">Billing History</h2>
|
<h2 class="text-xl font-semibold">Billing History</h2>
|
||||||
<ul class="space-y-3">
|
<ul class="space-y-3">
|
||||||
{#each transactions as transaction}
|
{#if transactions}
|
||||||
<li class="flex justify-between p-4 border border-gray-200 rounded-md">
|
{#each transactions as transaction}
|
||||||
<div>
|
<li class="flex justify-between p-4 border border-gray-200 rounded-md">
|
||||||
<p class="text-sm text-gray-500">Date: {transaction.created}</p>
|
<div>
|
||||||
<p class="text-sm text-gray-500">
|
<p class="text-sm text-gray-500">Date: {transaction.created}</p>
|
||||||
Amount: {transaction.amount}
|
<p class="text-sm text-gray-500">
|
||||||
{transaction.currency}
|
Amount: {transaction.amount}
|
||||||
</p>
|
{transaction.currency}
|
||||||
</div>
|
</p>
|
||||||
{#if transaction.receipt_url}
|
</div>
|
||||||
<a href={transaction.receipt_url} class="btn btn-outline btn-sm" target="_blank">
|
{#if transaction.receipt_url}
|
||||||
Download Receipt
|
<a href={transaction.receipt_url} class="btn btn-outline btn-sm" target="_blank">
|
||||||
</a>
|
Download Receipt
|
||||||
{:else}
|
</a>
|
||||||
<span class="text-gray-500">Receipt unavailable</span>
|
{:else}
|
||||||
{/if}
|
<span class="text-gray-500">Receipt unavailable</span>
|
||||||
</li>
|
{/if}
|
||||||
{/each}
|
</li>
|
||||||
|
{/each}
|
||||||
|
{/if}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user