Skip to content

Commit 786f511

Browse files
committed
feat(guide): 가이드 1, 2, 5 페이지 반응형 수정
1 parent b848f65 commit 786f511

4 files changed

Lines changed: 62 additions & 62 deletions

File tree

src/features/notification/ui/notification-sse-provider.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ function getPayloadId(payload: NotificationPayload | null): string | null {
4444
return null;
4545
}
4646

47-
function getPayloadTitle(payload: NotificationPayload | null): string | null {
47+
function getPayloadMessage(payload: NotificationPayload | null): string | null {
4848
if (!payload) return null;
49-
const candidate = payload.title;
49+
const candidate = payload.message;
5050
return typeof candidate === "string" && candidate.length > 0 ? candidate : null;
5151
}
5252

@@ -117,8 +117,8 @@ export function NotificationSseProvider() {
117117
if (payload) {
118118
const didPrepend = prependNotification(queryClient, payload);
119119

120-
const title = getPayloadTitle(payload);
121-
showToast.info(title ?? "새 알림이 도착했어요.");
120+
const message = getPayloadMessage(payload);
121+
showToast.info(message ?? "새 알림이 도착했어요.");
122122

123123
if (!didPrepend) {
124124
queryClient.invalidateQueries({ queryKey: notificationKeys.all });

src/screens/guide/ui/pages/guidebook-page1.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@ import { KEYWORDS } from "../../model/guide-data";
66

77
export function GuidebookPage1() {
88
return (
9-
<div className="flex h-full flex-col items-center justify-center text-center">
9+
<div className="flex h-full w-full flex-col items-center justify-center px-4 text-center sm:px-0">
1010
<motion.div
1111
initial={{ opacity: 0, y: 20 }}
1212
animate={{ opacity: 1, y: 0 }}
1313
transition={{ delay: 0.1, duration: 0.6 }}
14-
className="mb-6 max-[1024px]:mb-4"
14+
className="mb-4 sm:mb-6"
1515
>
1616
<motion.h1
17-
className="mb-3 text-4xl font-bold max-[1024px]:text-3xl"
17+
className="mb-2 text-3xl font-bold sm:mb-3 sm:text-4xl"
1818
style={{ color: "oklch(0.4758 0.2241 288.5)" }}
1919
>
2020
네덜란드 경매
2121
</motion.h1>
2222
<motion.p
23-
className="text-base text-gray-600 max-[1024px]:text-sm"
23+
className="text-sm text-gray-600 sm:text-base"
2424
initial={{ opacity: 0 }}
2525
animate={{ opacity: 1 }}
2626
transition={{ delay: 0.3, duration: 0.6 }}
2727
>
28-
시간이 지날수록 가격이 내려가는 독특한 경매 방식
28+
시간이 지날수록 가격이 <span className="text-red-500">내려가는</span> 독특한 경매 방식
2929
</motion.p>
3030
</motion.div>
3131

3232
<motion.div
33-
className="mb-8 h-1 w-20 rounded-full max-[1024px]:mb-6 max-[1024px]:w-16"
33+
className="mb-6 h-1 w-16 rounded-full sm:mb-8 sm:w-20"
3434
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5 / 0.3)" }}
3535
initial={{ width: 0 }}
3636
animate={{ width: 96 }}
3737
transition={{ delay: 0.5, duration: 0.6 }}
3838
/>
3939

40-
<div className="grid w-full max-w-3xl grid-cols-1 gap-4 max-[1024px]:gap-3 sm:grid-cols-3">
40+
<div className="grid w-full max-w-3xl grid-cols-3 gap-2 sm:gap-4">
4141
{KEYWORDS.map((keyword, index) => (
4242
<motion.div
4343
key={keyword.label}
@@ -47,37 +47,39 @@ export function GuidebookPage1() {
4747
className="flex flex-col items-center"
4848
>
4949
<motion.div
50-
className="mb-3 flex h-16 w-16 items-center justify-center rounded-full max-[1024px]:h-14 max-[1024px]:w-14"
50+
className="mb-2 flex h-12 w-12 items-center justify-center rounded-full sm:mb-3 sm:h-16 sm:w-16"
5151
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5 / 0.1)" }}
5252
whileHover={{ scale: 1.1, backgroundColor: "oklch(0.4758 0.2241 288.5 / 0.2)" }}
5353
>
5454
<keyword.icon
55-
className="h-8 w-8 max-[1024px]:h-7 max-[1024px]:w-7"
55+
className="h-6 w-6 sm:h-8 sm:w-8"
5656
style={{ color: "oklch(0.4758 0.2241 288.5)" }}
5757
/>
5858
</motion.div>
5959

6060
<motion.h3
61-
className="mb-1 text-lg font-semibold max-[1024px]:text-base"
61+
className="mb-1 text-sm font-semibold sm:text-lg"
6262
style={{ color: "oklch(0.4758 0.2241 288.5)" }}
6363
>
6464
{keyword.label}
6565
</motion.h3>
6666

6767
<motion.div
68-
className="mb-2 h-0.5 w-0"
68+
className="mb-1.5 h-0.5 w-0 sm:mb-2"
6969
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5)" }}
7070
animate={{ width: "100%" }}
7171
transition={{ delay: 0.8 + index * 0.15, duration: 0.6 }}
7272
/>
7373

74-
<p className="text-xs text-gray-600 max-[1024px]:text-[11px]">{keyword.description}</p>
74+
<p className="text-[11px] leading-snug text-gray-600 sm:text-xs sm:leading-normal">
75+
{keyword.description}
76+
</p>
7577
</motion.div>
7678
))}
7779
</div>
7880

7981
<motion.p
80-
className="mt-8 max-w-2xl text-xs text-gray-500 max-[1024px]:mt-6 max-[1024px]:text-[11px]"
82+
className="mt-5 max-w-2xl text-[11px] leading-snug text-gray-500 sm:mt-8 sm:text-xs sm:leading-normal"
8183
initial={{ opacity: 0 }}
8284
animate={{ opacity: 1 }}
8385
transition={{ delay: 1.5, duration: 0.6 }}

src/screens/guide/ui/pages/guidebook-page2.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,33 @@ export function GuidebookPage2() {
1919
}, []);
2020

2121
return (
22-
<section className="flex h-full flex-col items-center justify-center gap-6 lg:gap-8 xl:gap-12">
22+
<section className="flex h-full min-h-full w-full flex-col items-center justify-center gap-5 overflow-y-auto px-4 py-8 sm:gap-6 sm:overflow-visible sm:px-0 sm:py-0 lg:gap-8 xl:gap-12">
2323
<motion.div
2424
className="text-center"
2525
initial={{ opacity: 0, y: 20 }}
2626
animate={{ opacity: 1, y: 0 }}
2727
transition={{ duration: 0.6 }}
2828
>
29-
<h2 className="text-muted-foreground text-base">
29+
<h2 className="text-muted-foreground text-sm leading-relaxed sm:text-base sm:leading-normal">
3030
판매자가 정한 <strong>Stop Loss</strong>까지
3131
<br />
3232
<span className="font-semibold text-red-500">5분</span>
3333
마다 가격이 하락합니다
3434
</h2>
3535
</motion.div>
3636

37-
<div className="flex w-full max-w-lg flex-col gap-3">
37+
<div className="flex w-full max-w-lg flex-col gap-3 sm:gap-3">
3838
{priceData.map((point, index) => (
3939
<motion.div
4040
key={point.time}
41-
className="flex flex-col gap-2 px-1"
41+
className="flex flex-col gap-2 px-0.5 sm:gap-2 sm:px-1"
4242
initial={{ opacity: 0 }}
4343
animate={{ opacity: index < visibleBars ? 1 : 0 }}
4444
transition={{ duration: 0.4 }}
4545
>
4646
<div className="flex items-center gap-4">
4747
<motion.span
48-
className="w-16 text-xs text-gray-500 sm:text-sm"
48+
className="w-14 text-[11px] text-gray-500 sm:w-16 sm:text-sm"
4949
initial={{ opacity: 0, x: -10 }}
5050
animate={{ opacity: index < visibleBars ? 1 : 0, x: index < visibleBars ? 0 : -10 }}
5151
transition={{ delay: 0.08, duration: 0.25 }}
@@ -55,7 +55,7 @@ export function GuidebookPage2() {
5555

5656
{point.label && (
5757
<motion.span
58-
className="rounded-full px-2.5 py-0.5 text-xs font-medium"
58+
className="rounded-full px-2 py-0.5 text-[11px] font-medium sm:px-2.5 sm:text-xs"
5959
style={{
6060
backgroundColor:
6161
index === priceData.length - 1
@@ -81,7 +81,7 @@ export function GuidebookPage2() {
8181
</div>
8282

8383
<motion.div
84-
className="h-fit rounded-lg py-2"
84+
className="h-fit rounded-lg py-1.5 sm:py-2"
8585
style={{
8686
backgroundColor:
8787
index === priceData.length - 1
@@ -100,9 +100,9 @@ export function GuidebookPage2() {
100100
}}
101101
transition={{ duration: 0.65, ease: [0.34, 1.56, 0.64, 1] }}
102102
>
103-
<div className="flex items-center justify-between px-3">
103+
<div className="flex items-center justify-between px-2 sm:px-3">
104104
<motion.span
105-
className="text-md font-bold"
105+
className="sm:text-md text-sm font-bold"
106106
style={{
107107
color: index === priceData.length - 1 ? "white" : "oklch(0.4758 0.2241 288.5)",
108108
}}
@@ -118,7 +118,7 @@ export function GuidebookPage2() {
118118

119119
{index > 0 && (
120120
<motion.div
121-
className="rounded-full px-2 py-0.5 text-xs font-semibold"
121+
className="rounded-full px-1.5 py-0.5 text-[11px] font-semibold sm:px-2 sm:text-xs"
122122
style={{
123123
backgroundColor:
124124
index === priceData.length - 1
@@ -144,13 +144,13 @@ export function GuidebookPage2() {
144144
</div>
145145

146146
<motion.div
147-
className="rounded-xl px-3 py-2.5 text-center"
147+
className="mt-3 rounded-xl px-3 py-3 text-center sm:py-2.5"
148148
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5 / 0.15)" }}
149149
initial={{ opacity: 0, y: 20 }}
150150
animate={{ opacity: 1, y: 0 }}
151151
transition={{ delay: 2, duration: 0.6 }}
152152
>
153-
<p className="text-brand-text text-xs font-semibold">
153+
<p className="text-brand-text text-[11px] font-semibold sm:text-xs">
154154
💡 원하는 가격이 되면 즉시 구매할 수 있습니다
155155
</p>
156156
</motion.div>

src/screens/guide/ui/pages/guidebook-page5.tsx

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,17 @@ export function GuidebookPage5() {
1717
};
1818

1919
return (
20-
<section className="flex h-full min-h-full w-full flex-col items-center justify-center">
20+
<section className="flex h-full min-h-full w-full flex-col items-center justify-start gap-2 overflow-y-auto px-4 py-4 sm:justify-center sm:gap-3 sm:overflow-visible sm:px-0 sm:py-0 lg:gap-4 xl:gap-6">
2121
<motion.div
22-
className="mb-6 text-center max-[1024px]:mb-4"
22+
className="mb-3 text-center sm:mb-6"
2323
initial={{ opacity: 0, y: 20 }}
2424
animate={{ opacity: 1, y: 0 }}
2525
transition={{ duration: 0.6 }}
2626
>
27-
<p className="text-muted-foreground text-base max-[1024px]:text-sm">
28-
5단계로 간편하게 경매를 등록하세요
29-
</p>
27+
<h2 className="text-muted-foreground text-sm sm:text-base">간편하게 경매를 등록하세요</h2>
3028
</motion.div>
3129

32-
<div className="mb-8 flex flex-wrap items-center justify-center gap-3 max-[1024px]:mb-6 max-[1024px]:gap-2.5">
30+
<div className="flex flex-wrap items-center justify-center gap-2 sm:gap-3">
3331
{steps.map((step, index) => {
3432
const isCompleted = completedSteps.includes(index);
3533
const isCurrent = index === currentStep;
@@ -49,14 +47,14 @@ export function GuidebookPage5() {
4947
<React.Fragment key={step.id}>
5048
<motion.button
5149
onClick={() => setCurrentStep(index)}
52-
className="flex flex-col items-center gap-2 transition-all"
50+
className="flex flex-col items-center gap-1.5 transition-all sm:gap-2"
5351
initial={{ opacity: 0, scale: 0.8 }}
5452
animate={{ opacity: 1, scale: 1 }}
5553
transition={{ delay: index * 0.1 }}
5654
whileHover={{ scale: 1.05 }}
5755
>
5856
<motion.div
59-
className="flex h-12 w-12 items-center justify-center rounded-full border-2 transition-all max-[1024px]:h-10 max-[1024px]:w-10"
57+
className="flex h-9 w-9 items-center justify-center rounded-full border-2 transition-all sm:h-12 sm:w-12"
6058
style={{
6159
borderColor,
6260
backgroundColor,
@@ -74,27 +72,24 @@ export function GuidebookPage5() {
7472
transition={{ duration: 1.5, repeat: Infinity }}
7573
>
7674
{isCompleted ? (
77-
<CheckCircle className="h-6 w-6 text-white max-[1024px]:h-5 max-[1024px]:w-5" />
75+
<CheckCircle className="size-5 text-white sm:size-6" />
7876
) : (
7977
React.createElement(step.icon, {
80-
className: "h-5 w-5 max-[1024px]:h-4 max-[1024px]:w-4",
78+
className: "size-4 sm:size-5",
8179
style: {
8280
color: iconColor,
8381
},
8482
})
8583
)}
8684
</motion.div>
87-
<span
88-
className="text-xs font-medium max-[1024px]:text-[11px]"
89-
style={{ color: labelColor }}
90-
>
85+
<span className="text-xs font-medium sm:text-xs" style={{ color: labelColor }}>
9186
Step {index + 1}
9287
</span>
9388
</motion.button>
9489

9590
{index < steps.length - 1 && (
9691
<div
97-
className="-mt-4 h-0.5 w-8 max-[1024px]:w-6"
92+
className="-mt-3 h-0.5 w-3 sm:-mt-4 sm:w-4"
9893
style={{
9994
backgroundColor: isCompleted ? "oklch(0.4758 0.2241 288.5)" : "#E5E7EB",
10095
}}
@@ -112,22 +107,20 @@ export function GuidebookPage5() {
112107
transition={{ duration: 0.3 }}
113108
className="mx-auto w-full max-w-xl"
114109
>
115-
<div className="bg-card rounded-2xl p-6 max-[1024px]:p-5">
116-
<div className="mb-6 flex items-center gap-3">
110+
<div className="bg-card rounded-2xl p-4 sm:p-6">
111+
<div className="mb-4 flex items-center gap-2 sm:mb-6 sm:gap-3">
117112
<div
118-
className="flex h-10 w-10 items-center justify-center rounded-full max-[1024px]:h-9 max-[1024px]:w-9"
113+
className="flex h-9 w-9 items-center justify-center rounded-full sm:h-10 sm:w-10"
119114
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5 / 0.1)" }}
120115
>
121116
{React.createElement(steps[currentStep].icon, {
122-
className: "h-5 w-5 max-[1024px]:h-4 max-[1024px]:w-4",
117+
className: "size-5",
123118
style: { color: "oklch(0.4758 0.2241 288.5)" },
124119
})}
125120
</div>
126121
<div>
127-
<h3 className="text-lg font-semibold max-[1024px]:text-base">
128-
{steps[currentStep].label}
129-
</h3>
130-
<p className="text-muted-foreground text-xs max-[1024px]:text-[11px]">
122+
<h3 className="font-semibold">{steps[currentStep].label}</h3>
123+
<p className="text-muted-foreground text-[11px] sm:text-xs">
131124
{steps[currentStep].description}
132125
</p>
133126
</div>
@@ -136,7 +129,7 @@ export function GuidebookPage5() {
136129
<motion.input
137130
type="text"
138131
placeholder={steps[currentStep].placeholder}
139-
className="w-full rounded-lg border-2 px-4 py-3 text-sm transition-all outline-none max-[1024px]:px-3 max-[1024px]:py-2.5 max-[1024px]:text-xs"
132+
className="w-full rounded-lg border-2 px-3 py-2 text-xs transition-all outline-none sm:px-4 sm:py-3 sm:text-sm"
140133
style={{
141134
borderColor: "oklch(0.4758 0.2241 288.5)",
142135
boxShadow: "0 0 0 4px oklch(0.4758 0.2241 288.5 / 0.1)",
@@ -148,32 +141,37 @@ export function GuidebookPage5() {
148141

149142
<motion.button
150143
onClick={handleComplete}
151-
className="mt-4 flex w-full items-center justify-center gap-2 rounded-lg py-3 text-sm font-semibold text-white max-[1024px]:py-2.5 max-[1024px]:text-xs"
144+
className="mt-3 flex w-full items-center justify-center gap-2 rounded-lg py-2.5 text-xs font-semibold text-white sm:mt-4 sm:py-3 sm:text-sm"
152145
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5)" }}
153146
whileHover={{ scale: 1.02 }}
154147
whileTap={{ scale: 0.98 }}
155148
>
156149
{currentStep < steps.length - 1 ? "다음 단계" : "경매 등록하기"}
157-
<ChevronRight className="h-4 w-4 max-[1024px]:h-3.5 max-[1024px]:w-3.5" />
150+
<ChevronRight className="size-4" />
158151
</motion.button>
159152
</div>
160153
</motion.div>
161154

162-
{completedSteps.length === steps.length && (
155+
<div className="h-11 text-center sm:h-11">
163156
<motion.div
164-
className="mt-6 text-center max-[1024px]:mt-4"
165-
initial={{ opacity: 0, y: 20 }}
166-
animate={{ opacity: 1, y: 0 }}
157+
initial={false}
158+
animate={
159+
completedSteps.length === steps.length ? { opacity: 1, y: 0 } : { opacity: 0, y: 20 }
160+
}
161+
transition={{ duration: 0.25 }}
162+
className="flex justify-center"
163+
style={{ pointerEvents: completedSteps.length === steps.length ? "auto" : "none" }}
167164
>
168165
<div
169-
className="inline-flex items-center gap-2 rounded-full px-5 py-2.5 text-sm font-semibold text-white max-[1024px]:px-4 max-[1024px]:py-2 max-[1024px]:text-xs"
166+
className="inline-flex items-center gap-2 rounded-full px-4 py-2 text-xs font-semibold text-white sm:px-5 sm:py-2.5 sm:text-sm"
170167
style={{ backgroundColor: "oklch(0.4758 0.2241 288.5)" }}
168+
aria-hidden={completedSteps.length !== steps.length}
171169
>
172-
<CheckCircle className="h-4 w-4 max-[1024px]:h-3.5 max-[1024px]:w-3.5" />
170+
<CheckCircle className="size-3.5 sm:size-4" />
173171
모든 단계 완료!
174172
</div>
175173
</motion.div>
176-
)}
174+
</div>
177175
</section>
178176
);
179177
}

0 commit comments

Comments
 (0)