Skip to content

Commit

Permalink
fix(app): empty resources table, resolve #398
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Sep 2, 2023
1 parent f528585 commit a07dc3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion packages/app/src/components/ResourceTable.astro
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,5 @@ function followSearch(params: Record<string, string>) {
))
}</tbody
>
<tfoot></tfoot>
</table>
</div>
13 changes: 11 additions & 2 deletions packages/app/src/pages/resources/[page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,18 @@ const keywords = {
</div>
</>
)}
<ResourceTable resources={resources} />
{(complete && page === 1) || (
{resources.length > 0 ? (
<ResourceTable resources={resources} />
) : (
<div class="h-20 text-2xl text-orange-700/80 flex items-center justify-center">
<span class="mr2 i-carbon-query" />
<span>没有查找到相应的资源</span>
</div>
)}
{!(complete && page === 1) ? (
<Pagination page={page} href={(page) => `/resources/${page}${url.search}`} />
) : (
<div />
)}
</>
) : (
Expand Down

0 comments on commit a07dc3a

Please sign in to comment.