From 1b5d4ef0afebd835431d8dd85f7dc757af6cb7c1 Mon Sep 17 00:00:00 2001 From: al Date: Tue, 13 Aug 2024 16:00:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/page.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/page.js b/app/page.js index 119294e..36b3def 100644 --- a/app/page.js +++ b/app/page.js @@ -239,6 +239,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => { left: 0, behavior: "smooth", // 可选,平滑滚动效果 }); + // setFollowPostList([]); await getFollowPostList(ids.current, 0); } async function loadMore() { @@ -288,8 +289,7 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => { } else { setFollowPostList((old) => { - if(followsResponse.data.offset==4){ - + if(!offset){ return followsResponse.data.list; }else{ return [...old, ...followsResponse.data.list] @@ -321,8 +321,8 @@ const FollowPostList = forwardRef(({ scrollHeight }, ref) => { ))} {!followPostList?.length && (