Skip to content

Commit

Permalink
Merge pull request #74 from hhbb0081/test
Browse files Browse the repository at this point in the history
Fix: phone null 오류 해결
  • Loading branch information
hhbb0081 authored Dec 6, 2023
2 parents 08e565d + 94f57ba commit 0ff52ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/Home/Receipt/StatusReceipt/PendingReceipt.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ const PendingReceipt = ({ orderProps, setStatus, setOrder, fetchData }) => {
<div className="receiptTextBox">
<span className="receipt-text">주문시간</span>
<span className="receipt-text">
{orderProps?.time.split("T")[0].replaceAll("-", "/")}{" "}
{orderProps?.time.split("T")[1].split(".")[0]}
{orderProps?.time?.split("T")[0]?.replaceAll("-", "/")}{" "}
{orderProps?.time?.split("T")[1]?.split(".")[0]}
</span>
</div>
<div className="receiptTextBox">
<span className="receipt-text">고객연락처</span>
<span className="receipt-text">
{orderProps?.phone.replace(/(\d{3})(\d{4})(\d{4})/, "$1-$2-$3")}
{orderProps?.phone?.replace(/(\d{3})(\d{4})(\d{4})/, "$1-$2-$3")}
</span>
</div>
<div className="receipt-divider" />
Expand All @@ -159,7 +159,7 @@ const PendingReceipt = ({ orderProps, setStatus, setOrder, fetchData }) => {
<span className="receipt-FoodName">{e.count}</span>
</div>
<div className="receiptOption">
{e.options.map((option) => (
{e?.options?.map((option) => (
<span
className="receipt-optiontext"
style={{
Expand All @@ -181,7 +181,7 @@ const PendingReceipt = ({ orderProps, setStatus, setOrder, fetchData }) => {
<div className="receiptTextBox">
<span className="receipt-text">결제금액</span>
<span className="receipt-text">
{orderProps?.price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
{orderProps?.price?.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")}
</span>
</div>

Expand Down

0 comments on commit 0ff52ce

Please sign in to comment.