mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
chore: only show reports if length > 0
This commit is contained in:
@@ -423,10 +423,9 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if reportsSubmitted || reportsTarget}
|
{#if reportsSubmitted || reportsTarget}
|
||||||
<div class="mt-6 space-y-6">
|
<div class="mt-6 space-y-6">
|
||||||
{#if reportsSubmitted}
|
{#if reportsSubmitted && reportsSubmitted.reports.length > 0}
|
||||||
<div class="rounded border border-neutral-800 bg-neutral-900/60 p-4">
|
<div class="rounded border border-neutral-800 bg-neutral-900/60 p-4">
|
||||||
<h2 class="mb-3 text-xl font-semibold text-neutral-200">Submitted Reports</h2>
|
<h2 class="mb-3 text-xl font-semibold text-neutral-200">Submitted Reports</h2>
|
||||||
{#if reportsSubmitted.reports.length > 0}
|
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
{#each reportsSubmitted.reports as report (report.reportID)}
|
{#each reportsSubmitted.reports as report (report.reportID)}
|
||||||
<div
|
<div
|
||||||
@@ -485,19 +484,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
|
||||||
<p class="text-center text-neutral-400">No submitted reports to show.</p>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if reportsTarget}
|
{#if reportsTarget && reportsTarget.reports.length > 0}
|
||||||
<div class="rounded border border-neutral-800 bg-neutral-900/60 p-4">
|
<div class="rounded border border-neutral-800 bg-neutral-900/60 p-4">
|
||||||
<h2 class="mb-3 text-xl font-semibold text-neutral-200">Reports About This User</h2>
|
<h2 class="mb-3 text-xl font-semibold text-neutral-200">Reports About This User</h2>
|
||||||
{#if reportsTarget.reports.length > 0}
|
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
{#each reportsTarget.reports as report (report.reportID)}
|
{#each reportsTarget.reports as report (report.reportID)}
|
||||||
<div
|
<div
|
||||||
class="flex flex-col gap-2 rounded border border-neutral-700 bg-neutral-800 px-5 py-4 transition-colors duration-200 hover:bg-neutral-700 focus:ring-2 focus:ring-neutral-600 focus:outline-none"
|
class="cursor-pointer flex flex-col gap-2 rounded border border-neutral-700 bg-neutral-800 px-5 py-4 transition-colors duration-200 hover:bg-neutral-700 focus:ring-2 focus:ring-neutral-600 focus:outline-none"
|
||||||
role="link"
|
role="link"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
on:click={() => goto(resolve(`/report/${report.reportID}`))}
|
on:click={() => goto(resolve(`/report/${report.reportID}`))}
|
||||||
@@ -564,9 +559,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
|
||||||
<p class="text-center text-neutral-400">No reports to show.</p>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user