Skip to content

Commit

Permalink
fix: 판매상세, 구매상세 날짜 포매팅 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
im-na0 committed Jan 28, 2024
1 parent 69c681e commit 3ea162d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/pages/purchaseDetailPage/PurchaseDetail.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ export const PayContainer = styled.div`
padding: 1.5rem 1rem 3rem 1rem;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 10;
`;

export const PayInfo = styled.div`
Expand Down
7 changes: 4 additions & 3 deletions src/pages/purchaseDetailPage/PurchaseDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useNavigate, useSearchParams } from "react-router-dom";
import * as S from "./PurchaseDetail.style";
import { PATH } from "@/constants/path";
import { AxiosError } from "axios";
import { formatDateString } from "@/utils/dateFormatter";

const PurchaseDetail = () => {
const [searchParams] = useSearchParams();
Expand All @@ -20,7 +21,7 @@ const PurchaseDetail = () => {
<S.TopSection>
<S.TopSectionTitle>
<S.TopSectionPurchaseDate>
{data.paymentHistoryDate}
{formatDateString(data.paymentHistoryDate)}
</S.TopSectionPurchaseDate>
<S.TopSectionReserveNumber>
예약번호 {data.paymentHistoryId}
Expand Down Expand Up @@ -56,11 +57,11 @@ const PurchaseDetail = () => {
<S.DateContainer>
<S.CheckInDate>
<div>체크인</div>
<div>{data.checkIn}</div>
<div>{formatDateString(data.checkIn)}</div>
</S.CheckInDate>
<S.CheckOutDate>
<div>체크아웃</div>
<div>{data.checkOut}</div>
<div>{formatDateString(data.checkOut)}</div>
</S.CheckOutDate>
</S.DateContainer>
</S.ItemInfoContent>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/saleDetailPage/SaleDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SaleButton from "./saleButton/SaleButton";
import { calculateFee } from "@utils/calculator";
import { CaptionWrapper } from "@pages/paymentPage/Payment.style";
import Caption from "@components/caption/Caption";
import { formatDateString } from "@/utils/dateFormatter";

const SaleDetail = () => {
const { saleId } = useParams();
Expand Down Expand Up @@ -249,7 +250,7 @@ const SaleDetail = () => {
<S.TopSectionTitle>
<S.TopSectionPurchaseDate>판매일시</S.TopSectionPurchaseDate>
<S.TopSectionReserveNumber>
{data.checkIn}
{formatDateString(data.checkIn)}
</S.TopSectionReserveNumber>
</S.TopSectionTitle>
</S.TopSection>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/saleDetailPage/saleInfo/SaleInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { formatDateString } from "@/utils/dateFormatter";
import * as S from "@pages/saleDetailPage/SaleDetail.style";
import type { ISaleData } from "@type/saleDetail";

Expand Down Expand Up @@ -25,13 +26,13 @@ const SaleInfo = ({ info }: SaleInfoProps) => {
<S.Text variant="body3" color="greyScale1">
체크인
</S.Text>
<S.Text variant="body3">{info.checkIn}</S.Text>
<S.Text variant="body3">{formatDateString(info.checkIn)}</S.Text>
</S.LeftBox>
<S.RightBox>
<S.Text variant="body3" color="greyScale1">
체크아웃
</S.Text>
<S.Text variant="body3">{info.checkOut}</S.Text>
<S.Text variant="body3">{formatDateString(info.checkOut)}</S.Text>
</S.RightBox>
</S.VStack3>
</>
Expand Down

0 comments on commit 3ea162d

Please sign in to comment.