Skip to content
Merged
Show file tree
Hide file tree
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
30 changes: 3 additions & 27 deletions frontend/src/app/(main)/me/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { useEffect, useState } from "react";
import { useToast } from "@/components/Toast";
import { ApiError, api } from "@/lib/api";
import { useAuth } from "@/lib/auth";
import { countdown, dateOnly, won } from "@/lib/format";
import { useLoad, useNow } from "@/lib/hooks";
import { won } from "@/lib/format";
import { useLoad } from "@/lib/hooks";
import { ORDER_STATUS, checkoutHref, orderTitle } from "@/lib/orders";
import type { OrderPage, Profile, TicketReservationDetail, WalletView } from "@/lib/types";
import type { OrderPage, Profile, WalletView } from "@/lib/types";

export default function MePage() {
const { profile, ready, setProfile } = useAuth();
Expand All @@ -36,9 +36,7 @@ export default function MePage() {

function MeInner({ profile, setProfile }: { profile: Profile; setProfile: (p: Profile) => void }) {
const toast = useToast();
const now = useNow();
const wallet = useLoad(() => api<WalletView>("/api/me/wallet"));
const tickets = useLoad(() => api<TicketReservationDetail[]>("/api/ticket-reservations/active"));
const orders = useLoad(() => api<OrderPage>("/api/me/orders?size=20").then((page) => page.items));
const [form, setForm] = useState({
nickname: profile.nickname,
Expand Down Expand Up @@ -117,28 +115,6 @@ function MeInner({ profile, setProfile }: { profile: Profile; setProfile: (p: Pr
</ul>
</section>

<section className="fq-card is-pad">
<div className="fq-between">
<span className="fq-eyebrow">진행 중인 예매</span>
<Link href="/me/tickets" className="fq-link">
내 티켓 →
</Link>
</div>
<ul className="fq-list">
{(tickets.data ?? []).length === 0 ? <li className="fq-muted">진행 중인 예매가 없어요</li> : null}
{(tickets.data ?? []).map((t) => (
<li key={t.reservationId}>
<span className="fq-dot" aria-hidden="true" />
<div>
<b>예약 #{t.reservationId}</b>
<small className="fq-muted">좌석 {t.seats.length}석{t.holdExpired ? ", 선점 만료 처리 대기" : ""}</small>
</div>
<span className="fq-chip is-live fq-num">{t.paymentExpiresAt ? countdown(t.paymentExpiresAt, now) : countdown(t.holdExpiresAt, now)}</span>
</li>
))}
</ul>
</section>

<section className="fq-card is-pad fq-me-form">
<span className="fq-eyebrow">프로필과 기본 배송지</span>
<form className="fq-form" onSubmit={save}>
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/app/(main)/pro.css
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,7 @@
border-radius: 7px;
}

/* ── 마이페이지: 두 단으로 정돈 ─────────── */
.u040 .fq-me {
max-width: 1120px;
}
/* ── 마이페이지: 두 단으로 정돈. 폭은 제목줄, 푸터와 같은 선에서 끝난다 ─────────── */
.u040 .fq-me-hero {
gap: 16px;
margin-bottom: 28px;
Expand Down
Loading