Skip to content

Commit

Permalink
Improved empty state for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
allanlasser committed Apr 24, 2024
1 parent 1ea1c02 commit f43b366
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/routes/app/projects/[id]-[slug]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import {
FileDirectory24,
Hourglass24,
Pencil16,
People16,
Expand Down Expand Up @@ -53,12 +54,16 @@
{#await documentSearch}
<Empty icon={Hourglass24}>Loading project documents…</Empty>
{:then documentSearchResults}
<ResultsList
results={documentSearchResults.results}
next={documentSearchResults.next}
count={documentSearchResults.count}
auto
/>
{#if documentSearchResults.results}
<ResultsList
results={documentSearchResults.results}
next={documentSearchResults.next}
count={documentSearchResults.count}
auto
/>
{:else}
<Empty icon={FileDirectory24}>This project is empty</Empty>
{/if}
{:catch}
<Error>Error loading project documents</Error>
{/await}
Expand Down

0 comments on commit f43b366

Please sign in to comment.