Skip to content

Commit

Permalink
[ISSUE-315] 주문 페이지 외에서 resize 시 오류 (#336)
Browse files Browse the repository at this point in the history
* [FEAT] 주문 조회 사진 이슈 해결

* [FEAT] 상품 이미지 없는 경우 photoNotFoundImg 보여줌

* [UI] 주문 조회 및 상세 조회 UI 수정

* Log 삭제

* [BUGFIX] remove resize event when unmounted
  • Loading branch information
2hanbyeol1 authored Dec 3, 2023
1 parent 0ed7069 commit 99baa07
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/screen/order/Order.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import './Order.css';
import $ from 'jquery';
import Header from '../../component/common/Header';
import Footer from '../../component/common/Footer';
import { useEffect, useState } from 'react';
Expand Down Expand Up @@ -34,9 +33,11 @@ const Order = () => {
useEffect(() => {
retriveProductData();

$(window).on('resize', function () {
calcHeight();
});
window.addEventListener('resize', calcHeight);
return () => {
// unmount 시 event 제거
window.removeEventListener('resize', calcHeight);
};
}, []);

// set product-image top : vertical center
Expand Down

0 comments on commit 99baa07

Please sign in to comment.