[저스트포유배너]
- 회원정보있을때 노출이라고 하여 우선 롤링유닛 적용.
This commit is contained in:
@@ -114,15 +114,17 @@ export default function RollingUnit({
|
|||||||
);
|
);
|
||||||
const countryCode = useSelector((state) => state.common.httpHeader.cntry_cd);
|
const countryCode = useSelector((state) => state.common.httpHeader.cntry_cd);
|
||||||
|
|
||||||
|
const { userNumber } = useSelector((state) => state.common.appStatus.loginUserData);
|
||||||
|
|
||||||
const bannerId = `banner-${bannerData.banrLctnNo}`;
|
const bannerId = `banner-${bannerData.banrLctnNo}`;
|
||||||
const savedIndex = useSelector((state) => state.home.bannerIndices[bannerId]);
|
const savedIndex = useSelector((state) => state.home.bannerIndices[bannerId]);
|
||||||
|
|
||||||
// 컴포넌트 상단에서 필터링
|
// 컴포넌트 상단에서 필터링
|
||||||
const filteredRollingData = useMemo(() => {
|
const filteredRollingData = useMemo(() => {
|
||||||
return rollingData.filter(
|
return rollingData.filter(
|
||||||
(item) => introTermsAgree === true || item.shptmLnkTpCd !== "DSP00510"
|
(item) => (introTermsAgree === true && (userNumber !== undefined && userNumber !== '')) || item.shptmLnkTpCd !== "DSP00510"
|
||||||
);
|
);
|
||||||
}, [rollingData, introTermsAgree]);
|
}, [rollingData, introTermsAgree, userNumber]);
|
||||||
|
|
||||||
// 이후 filteredRollingData 사용
|
// 이후 filteredRollingData 사용
|
||||||
const rollingDataLength = filteredRollingData.length;
|
const rollingDataLength = filteredRollingData.length;
|
||||||
|
|||||||
Reference in New Issue
Block a user