Added await
This commit is contained in:
parent
ca09aa0fd5
commit
e031673e9c
|
@ -33,26 +33,46 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="bg-white dark:bg-gray-700 divide-y divide-gray-200 dark:text-gray-100" x-max="1">
|
<tbody class="bg-white dark:bg-gray-700 divide-y divide-gray-200 dark:text-gray-100" x-max="1">
|
||||||
{#each urls as url}
|
{#await urlQuery}
|
||||||
<tr>
|
<tr>
|
||||||
<td
|
<td
|
||||||
class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-200"
|
class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-200"
|
||||||
>
|
>
|
||||||
{url.shortcode}
|
Loading data...
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm">
|
<td class="px-6 py-4 whitespace-nowrap text-sm">
|
||||||
<a href={url.target}>{url.target}</a>
|
<a href="#">Loading data...</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm"> {url.visits} </td>
|
<td class="px-6 py-4 whitespace-nowrap text-sm"> Loading data... </td>
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
||||||
<button
|
<button
|
||||||
on:click={deleteUrl(url.shortcode)}
|
|
||||||
class="text-indigo-600 dark:text-red-600 hover:text-indigo-900 dark:hover:text-red-900"
|
class="text-indigo-600 dark:text-red-600 hover:text-indigo-900 dark:hover:text-red-900"
|
||||||
>Delete</button
|
>Delete</button
|
||||||
>
|
>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/each}
|
{:then}
|
||||||
|
{#each urls as url}
|
||||||
|
<tr>
|
||||||
|
<td
|
||||||
|
class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-gray-200"
|
||||||
|
>
|
||||||
|
{url.shortcode}
|
||||||
|
</td>
|
||||||
|
<td class="px-6 py-4 whitespace-nowrap text-sm">
|
||||||
|
<a href={url.target}>{url.target}</a>
|
||||||
|
</td>
|
||||||
|
<td class="px-6 py-4 whitespace-nowrap text-sm"> {url.visits} </td>
|
||||||
|
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
||||||
|
<button
|
||||||
|
on:click={deleteUrl(url.shortcode)}
|
||||||
|
class="text-indigo-600 dark:text-red-600 hover:text-indigo-900 dark:hover:text-red-900"
|
||||||
|
>Delete</button
|
||||||
|
>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
{/await}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue