Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/pages/photoManage/PhotoManageMainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getActiveStatus } from "@/utils/getActiveStatus";
import { STATUS_INDEX_MAP } from "@/constants/photomanage/status.constant";
import { getBannerContent } from "@/lib/getBannerContent";
import { usePrintOrderStore } from "@/store/usePrintOrder.store";
import { usePrintSkip, useConfirmReceipt } from "@/hooks/photoManage";
// import { usePrintSkip, useConfirmReceipt } from "@/hooks/photoManage";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

주석 처리된 import 문은 코드 베이스를 복잡하게 만듭니다. 사용하지 않는 코드는 삭제하고 필요할 때 Git 히스토리를 통해 확인하는 것이 좋습니다.


export default function PhotoManageMainPage() {
const navigate = useNavigate();
Expand Down Expand Up @@ -50,11 +50,11 @@ export default function PhotoManageMainPage() {
queryFn: getCurrentWork,
});

// 인화 안 함 확정
const { mutate: printSkip } = usePrintSkip();
// 인화 안 함 확정 - 데모데이용에서는 제거
// const { mutate: printSkip } = usePrintSkip();

// 수령 확정
const { mutate: confirmReceiptMutate } = useConfirmReceipt();
// 수령 확정 - 데모데이용에서는 제거
// const { mutate: confirmReceiptMutate } = useConfirmReceipt();
Comment on lines +53 to +57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

기능 비활성화를 위해 로직을 주석 처리하는 것보다, 환경 변수나 상수를 이용한 기능 플래그(Feature Flag)를 도입하여 제어하는 것이 향후 코드 관리 측면에서 더 효율적입니다.


const workData = currentWorkResponse?.data;
const setDevelopmentOrderId = usePrintOrderStore(
Expand Down Expand Up @@ -90,8 +90,7 @@ export default function PhotoManageMainPage() {
}),
onGoFeed: () => navigate("/photoFeed"),
onGoTrackDelivery: () => {},
onConfirmReceived: () =>
confirmReceiptMutate(workData.developmentOrderId),
onConfirmReceived: () => {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

onConfirmReceived를 빈 함수로 두면 UI에서 버튼은 노출되지만 작동하지 않아 사용자에게 혼란을 줄 수 있습니다. 데모 모드일 경우 버튼이 렌더링되지 않도록 처리하는 것이 좋습니다.

})
: [];

Expand Down Expand Up @@ -181,7 +180,7 @@ export default function PhotoManageMainPage() {
if (dialogStep === 1) setDialogStep(2);
else {
setIsDialogOpen(false);
printSkip(workData.developmentOrderId);
//printSkip(workData.developmentOrderId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

주석 처리된 코드는 삭제하여 코드의 청결함을 유지해 주세요.

}
}}
/>
Expand Down