简化首页加载按钮:合并「显示后续」与「载入更多」为单一智能按钮
- 3 天视图且有折叠比赛时 →「显示后续 N 场未开赛」(展开) - 展开全部后 / 非 3 天视图 →「载入更多赛程」(从服务器拉取下一页) - 移除重复按钮,保留「收起」文字链接回 3 天视图 Co-Authored-By: new-provider/LongCat-2.0 <<EMAIL>>
This commit is contained in:
co-authored by
new-provider/LongCat-2.0 <
parent
acac856b61
commit
9d7f8dfeee
@@ -642,15 +642,21 @@ export default function Matches() {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
{/* 未开赛视图:从「未来 3 天」展开全部已加载的未开赛 */}
|
{/* 单一「加载更多」按钮:3 天视图时先展开,展开后从服务器拉取下一页 */}
|
||||||
{!loading && hasHiddenUpcoming && (
|
{!loading && (hasHiddenUpcoming || nextCursor) && (
|
||||||
<div className="flex justify-center pt-4">
|
<div className="flex justify-center pt-4">
|
||||||
<button
|
{hasHiddenUpcoming ? (
|
||||||
onClick={() => setShowAllUpcoming(true)}
|
<button
|
||||||
className="btn btn-outline min-h-[44px] w-full max-w-xs sm:w-auto"
|
onClick={() => setShowAllUpcoming(true)}
|
||||||
>
|
className="btn btn-outline min-h-[44px] w-full max-w-xs sm:w-auto"
|
||||||
显示后续 {matches.length - visibleMatches.length} 场未开赛
|
>
|
||||||
</button>
|
显示后续 {matches.length - visibleMatches.length} 场未开赛
|
||||||
|
</button>
|
||||||
|
) : (
|
||||||
|
<button onClick={loadMore} disabled={loadingMore} className="btn min-h-[44px] w-full max-w-xs sm:w-auto">
|
||||||
|
{loadingMore ? (<><Spinner /> 获取中</>) : '载入更多赛程'}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -665,14 +671,6 @@ export default function Matches() {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{!loading && nextCursor && (
|
|
||||||
<div className="flex justify-center pt-4">
|
|
||||||
<button onClick={loadMore} disabled={loadingMore} className="btn min-h-[44px] w-full max-w-xs sm:w-auto">
|
|
||||||
{loadingMore ? (<><Spinner /> 获取中</>) : '载入更多赛程'}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user