페이징 방어코드 추가

This commit is contained in:
focp212@naver.com
2025-10-26 12:35:09 +09:00
parent f4b8ee29d8
commit fdedc3d519
22 changed files with 459 additions and 254 deletions

View File

@@ -22,6 +22,8 @@ import useIntersectionObserver from '@/widgets/intersection-observer';
export const FundAccountResultListWrap = () => {
const { navigate } = useNavigate();
let recentCursor = null;
const userMid = useStore.getState().UserStore.mid;
const [onActionIntersect, setOnActionIntersect] = useState<boolean>(false);
@@ -56,6 +58,7 @@ export const FundAccountResultListWrap = () => {
if(entry.isIntersecting){
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
if(onActionIntersect && !!pageParam.cursor){
setOnActionIntersect(false);
callList('page');
}
}
@@ -101,6 +104,7 @@ export const FundAccountResultListWrap = () => {
setListItems(rs.content);
}
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -115,7 +119,8 @@ export const FundAccountResultListWrap = () => {
});
}
setOnActionIntersect(
!!rs.hasNext
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});

View File

@@ -57,6 +57,7 @@ export const FundAccountTransferListWrap = () => {
if(entry.isIntersecting){
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
if(onActionIntersect && !!pageParam.cursor){
setOnActionIntersect(false);
callList('page');
}
}
@@ -100,7 +101,8 @@ export const FundAccountTransferListWrap = () => {
else{
setListItems(rs.content);
}
if(rs.hasNext
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -115,7 +117,8 @@ export const FundAccountTransferListWrap = () => {
});
}
setOnActionIntersect(
!!rs.hasNext
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});

View File

@@ -53,6 +53,7 @@ export const LinkPaymentHistoryWrap = () => {
if(entry.isIntersecting){
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
if(onActionIntersect && !!pageParam.cursor){
setOnActionIntersect(false);
callList('page');
}
}
@@ -102,6 +103,7 @@ export const LinkPaymentHistoryWrap = () => {
setListItems(rs.content);
}
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -116,7 +118,8 @@ export const LinkPaymentHistoryWrap = () => {
});
}
setOnActionIntersect(
!!rs.hasNext
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});

View File

@@ -45,6 +45,7 @@ export const LinkPaymentWaitSendWrap = () => {
if(entry.isIntersecting){
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
if(onActionIntersect && !!pageParam.cursor){
setOnActionIntersect(false);
callList('page');
}
}
@@ -96,6 +97,7 @@ export const LinkPaymentWaitSendWrap = () => {
setListItems(rs.content);
}
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -110,7 +112,8 @@ export const LinkPaymentWaitSendWrap = () => {
});
}
setOnActionIntersect(
!!rs.hasNext
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});

View File

@@ -51,6 +51,7 @@ export const AlarmList = ({
if(entry.isIntersecting){
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
if(onActionIntersect && !!pageParam.cursor){
setOnActionIntersect(false);
callList('page');
}
}

View File

@@ -148,6 +148,7 @@ export const ListWrap = ({
setSettlementDateListItems(rs.content);
}
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -162,7 +163,8 @@ export const ListWrap = ({
});
}
setOnActionIntersect(
!!rs.hasNext
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});
@@ -212,6 +214,7 @@ export const ListWrap = ({
setTransactionDateListItems(rs.content);
}
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -227,6 +230,7 @@ export const ListWrap = ({
}
setOnActionIntersect(
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});

View File

@@ -40,6 +40,7 @@ export const ListWrap = () => {
if(entry.isIntersecting){
console.log('Element is now intersecting with the root. [' + onActionIntersect + ']');
if(onActionIntersect && !!pageParam.cursor){
setOnActionIntersect(false);
callList('page');
}
}
@@ -79,6 +80,7 @@ export const ListWrap = () => {
setListItems(rs.content);
}
if(rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
){
setPageParam({
@@ -94,6 +96,7 @@ export const ListWrap = () => {
}
setOnActionIntersect(
!!rs.hasNext
&& rs.nextCursor !== pageParam.cursor
&& rs.content.length === DEFAULT_PAGE_PARAM.size
);
});