[251018] fix: EnergyLabel cleanup

🕐 커밋 시간: 2025. 10. 18. 23:42:07

📊 변경 통계:
  • 총 파일: 1개
  • 추가: +7줄
  • 삭제: -6줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/components/TItemCard/TItemCard.new.jsx

🔧 함수 변경 내용:
  📄 com.twin.app.shoptime/src/components/TItemCard/TItemCard.new.jsx (javascript):
    🔄 Modified: parsePrice()

🔧 주요 변경 내용:
  • UI 컴포넌트 아키텍처 개선
This commit is contained in:
2025-10-18 23:42:08 +09:00
parent 0781bb39b2
commit cf3bc87230

View File

@@ -121,11 +121,12 @@ export default memo(function TItemCardNew({
const serverHOST = useSelector((state) => state.common.appStatus.serverHOST);
const serverType = useSelector((state) => state.localSettings.serverType);
// 컴포넌트 unmount 시 메모리 정리
useEffect(() => {
const currentBlobUrl = convert?.convertedImage;
return () => {
if (convert?.convertedImage) {
URL.revokeObjectURL(convert.convertedImage);
if (currentBlobUrl && currentBlobUrl.startsWith('blob:')) {
URL.revokeObjectURL(currentBlobUrl);
}
};
}, [convert?.convertedImage]);
@@ -286,10 +287,8 @@ export default memo(function TItemCardNew({
return sanitizedString;
}, [productName]);
// 🔽 팝업 닫기 + 메모리 정리
const handleClosePopup = useCallback(() => {
// Object URL 메모리 해제
if (convert?.convertedImage) {
if (convert?.convertedImage && convert.convertedImage.startsWith('blob:')) {
URL.revokeObjectURL(convert.convertedImage);
}