TItemCard 통합로그 호출 시 로그시나리오에 속하는 클릭에서만 호출되도록 방어로직 추가
This commit is contained in:
@@ -112,25 +112,27 @@ export default memo(function TItemCard({
|
||||
if (onClick) {
|
||||
onClick(e);
|
||||
|
||||
const params = {
|
||||
contextName: contextName,
|
||||
messageId: messageId,
|
||||
shelfLocation: shelfLocation,
|
||||
shelfId: shelfId,
|
||||
shelfTitle: shelfTitle,
|
||||
productId: productId,
|
||||
productTitle: productName,
|
||||
partner: patnerName,
|
||||
brand: brandName,
|
||||
price: originalPrice,
|
||||
discount: discountRate,
|
||||
locaiton: location,
|
||||
category: catNm,
|
||||
};
|
||||
dispatch(sendLogTotalRecommend(params));
|
||||
if (contextName && messageId) {
|
||||
const params = {
|
||||
contextName: contextName,
|
||||
messageId: messageId,
|
||||
shelfLocation: shelfLocation,
|
||||
shelfId: shelfId,
|
||||
shelfTitle: shelfTitle,
|
||||
productId: productId,
|
||||
productTitle: productName,
|
||||
partner: patnerName,
|
||||
brand: brandName,
|
||||
price: originalPrice,
|
||||
discount: discountRate,
|
||||
locaiton: location,
|
||||
category: catNm,
|
||||
};
|
||||
dispatch(sendLogTotalRecommend(params));
|
||||
}
|
||||
}
|
||||
},
|
||||
[onClick, disabled]
|
||||
[onClick, disabled, contextName, messageId]
|
||||
);
|
||||
const _onFocus = useCallback(() => {
|
||||
if (onFocus) {
|
||||
|
||||
Reference in New Issue
Block a user