隐藏大厅加载完成提示
This commit is contained in:
@@ -117,7 +117,6 @@ export default function WorkerHallPage() {
|
||||
const orders = ordersQuery.data?.pages.flatMap((page) => page.data.items) || []
|
||||
const firstPage = ordersQuery.data?.pages[0]?.data
|
||||
const categories = firstPage?.categories || []
|
||||
const totalOrderCount = Number(firstPage?.pagination.total || 0)
|
||||
const worker = profileQuery.data?.data.worker
|
||||
const activeCount = Number(profileQuery.data?.data.summary.activeOrderCount || 0)
|
||||
const pendingAcceptanceCount = hallSummaryQuery.data?.pendingAcceptanceCount || 0
|
||||
@@ -216,14 +215,14 @@ export default function WorkerHallPage() {
|
||||
}
|
||||
|
||||
const loadMoreIndicator =
|
||||
orders.length > 0 ? (
|
||||
orders.length > 0 &&
|
||||
(ordersQuery.hasNextPage ||
|
||||
ordersQuery.isFetchingNextPage ||
|
||||
ordersQuery.isFetchNextPageError) ? (
|
||||
<div ref={loadMoreRef} className="worker-hall-load-more" aria-live="polite">
|
||||
{ordersQuery.isFetchingNextPage ? <Spin size="small" /> : null}
|
||||
{ordersQuery.isFetchingNextPage ? <span>加载中</span> : null}
|
||||
{ordersQuery.isFetchNextPageError ? <span>加载失败,请刷新后重试</span> : null}
|
||||
{!ordersQuery.hasNextPage && !ordersQuery.isFetchingNextPage ? (
|
||||
<span>已加载全部 {totalOrderCount} 条</span>
|
||||
) : null}
|
||||
</div>
|
||||
) : null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user