简化首页加载按钮:合并「显示后续」与「载入更多」为单一智能按钮

- 3 天视图且有折叠比赛时 →「显示后续 N 场未开赛」(展开)
- 展开全部后 / 非 3 天视图 →「载入更多赛程」(从服务器拉取下一页)
- 移除重复按钮,保留「收起」文字链接回 3 天视图

Co-Authored-By: new-provider/LongCat-2.0 <<EMAIL>>
This commit is contained in:
shangfangjian
2026-09-20 20:52:25 +08:00
co-authored by new-provider/LongCat-2.0 <
parent acac856b61
commit 9d7f8dfeee
+8 -10
View File
@@ -642,15 +642,21 @@ export default function Matches() {
</div>
))}
{/* 未开赛视图:从「未来 3 天」展开全部已加载的未开赛 */}
{!loading && hasHiddenUpcoming && (
{/* 单一「加载更多」按钮:3 天视图时先展开,展开后从服务器拉取下一页 */}
{!loading && (hasHiddenUpcoming || nextCursor) && (
<div className="flex justify-center pt-4">
{hasHiddenUpcoming ? (
<button
onClick={() => setShowAllUpcoming(true)}
className="btn btn-outline min-h-[44px] w-full max-w-xs sm:w-auto"
>
{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>
)}
@@ -665,14 +671,6 @@ export default function Matches() {
</button>
</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>
</div>