feat: 🎸 优化了滚动加载
This commit is contained in:
@@ -42,6 +42,7 @@ const ProjectLibrary = () => {
|
||||
page: pageNum ?? page,
|
||||
pageSize: PAGE_SIZE,
|
||||
});
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
setProjectList((prevList) => {
|
||||
const newList = [...prevList, ...res.data];
|
||||
@@ -72,6 +73,7 @@ const ProjectLibrary = () => {
|
||||
loadMore={fetchProjects}
|
||||
hasMore={hasMore}
|
||||
threshold={100}
|
||||
empty={projectList.length === 0}
|
||||
className="user-portfolio-list"
|
||||
>
|
||||
{projectList.map((item) => (
|
||||
|
||||
Reference in New Issue
Block a user