File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/shop/src/components/features Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ const OrderItem: React.FC<{ order: ShopSchemas.Order; disabled?: boolean }> = ({
4545 orderRefundMutation . isPending ||
4646 oneItemRefundMutation . isPending ||
4747 optionsOfOneItemInOrderPatchMutation . isPending ;
48- const btnDisabled =
49- isPending || ! R . isNullish ( order . not_fully_refundable_reason ) ;
48+ const refundBtnDisabled = isPending || ! R . isNullish ( order . not_fully_refundable_reason ) ;
49+ const receipyBtnDisabled = isPending || order . current_status === "pending" ;
5050 const btnText = R . isNullish ( order . not_fully_refundable_reason )
5151 ? "주문 전체 환불"
5252 : order . current_status === "refunded"
@@ -187,15 +187,15 @@ const OrderItem: React.FC<{ order: ShopSchemas.Order; disabled?: boolean }> = ({
187187 variant = "contained"
188188 sx = { { width : "100%" } }
189189 onClick = { openReceipt }
190- disabled = { btnDisabled }
190+ disabled = { receipyBtnDisabled }
191191 >
192192 영수증
193193 </ Button >
194194 < Button
195195 variant = "contained"
196196 sx = { { width : "100%" } }
197197 onClick = { refundOrder }
198- disabled = { btnDisabled }
198+ disabled = { refundBtnDisabled }
199199 >
200200 { btnText }
201201 </ Button >
You can’t perform that action at this time.
0 commit comments