[긴급배포] [지라이슈없음] 딥링크로 핫픽스 진입 후 카테고리 패널 진입 시 앱 죽는 현상

This commit is contained in:
hyunwoo93.cha
2024-11-07 16:54:55 +09:00
parent 066872c5bc
commit b639915af4
5 changed files with 19 additions and 13 deletions

View File

@@ -177,16 +177,20 @@ export const getSubCategory =
const { lgCatCd, patnrIdList, tabType, filterType } = params;
let pageSize = params.pageSize || CATEGORY_DATA_MAX_RESULTS_LIMIT;
if (pageNo === 1 && getSubCategoryKey) {
if (JSON.stringify(lastSubCategoryParams) === JSON.stringify(params)) {
if (pageNo === 1) {
if (
lastSubCategoryParams &&
JSON.stringify(lastSubCategoryParams) === JSON.stringify(params)
) {
console.log("getSubCategory ignore patch");
return;
}
lastSubCategoryParams = params;
lastSubCategoryParams = { ...params };
if (clear) {
dispatch(clearSubCategory());
}
}
let currentKey = key;
const onSuccess = (response) => {
console.log("getSubCategory onSuccess ", response.data);
@@ -237,6 +241,11 @@ export const getSubCategory =
export const continueGetSubCategory =
(key, pageNo = 2) =>
(dispatch, getState) => {
if (!lastSubCategoryParams) {
console.warn("No previous category parameters found");
return;
}
const subCategoryData = getState().main.subCategoryData;
const targetData =
subCategoryData[key]?.subCatItemList ||