Skip to content

Commit 668b318

Browse files
authored
Merge pull request #35 from SEASONTHON-Wedit/feat/31-invite
fix : λ””μžμΈ QA μš°μ„  μ§„ν–‰
2 parents 6d9e611 + 348895e commit 668b318

File tree

18 files changed

+200
-97
lines changed

18 files changed

+200
-97
lines changed
419 KB
Loading
79.7 KB
Loading
1.76 KB
Loading
1.18 KB
Loading
261 KB
Loading
6.33 KB
Loading
6.66 KB
Loading

β€Žsrc/app/(main)/calendar/new/page.tsxβ€Ž

Lines changed: 52 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// app/(main)/calendar/new/page.tsx
21
'use client';
32

43
import { STICKER_SRC } from '@/components/calendar/stickers';
@@ -13,33 +12,57 @@ import { useMemo, useState } from 'react';
1312

1413
type StickerKey = keyof typeof STICKER_SRC;
1514

15+
const ICON_CFG: Record<
16+
StickerKey,
17+
{ w: number; h: number; className?: string }
18+
> = {
19+
INVITATION: {
20+
w: 60,
21+
h: 62,
22+
className:
23+
'origin-top-left rotate-[-30.22deg] -translate-x-4 translate-y-7',
24+
},
25+
STUDIO: { w: 50, h: 46 },
26+
WEDDING_HALL: { w: 46, h: 46, className: 'translate-y-0.5' },
27+
DRESS: { w: 40, h: 50 },
28+
PARTY: { w: 51, h: 61 },
29+
BRIDAL_SHOWER: { w: 61, h: 61 },
30+
MAKEUP: { w: 33, h: 47 },
31+
};
32+
1633
export default function CalendarNewPage() {
1734
const router = useRouter();
1835
const [title, setTitle] = useState('');
1936
const [titleStarted, setTitleStarted] = useState(false);
2037
const [memo, setMemo] = useState('');
2138
const [sticker, setSticker] = useState<StickerKey | null>(null);
39+
const [loading, setLoading] = useState(false);
2240

2341
const disabled = !title.trim() || !sticker;
2442

2543
const stickers: StickerKey[] = useMemo(
26-
() => ['INVITATION', 'STUDIO', 'WEDDING_HALL', 'DRESS', 'PARTY', 'BRIDAL_SHOWER', 'MAKEUP'],
44+
() => [
45+
'INVITATION',
46+
'STUDIO',
47+
'WEDDING_HALL',
48+
'DRESS',
49+
'PARTY',
50+
'BRIDAL_SHOWER',
51+
'MAKEUP',
52+
],
2753
[],
2854
);
2955

30-
const [loading, setLoading] = useState(false);
31-
3256
const onSubmit = async (e: React.FormEvent) => {
3357
e.preventDefault();
3458
if (disabled || !sticker) return;
35-
3659
try {
3760
setLoading(true);
3861
await createCalendarEvent({
3962
title,
4063
description: memo,
41-
eventCategory: sticker.toUpperCase(), // μ„œλ²„ enum이 'LETTER' 같은 UPPERCASE라면 λ³€ν™˜ ν•„μš”
42-
startDateTime: new Date().toISOString(), // TODO: λ‚ μ§œ 선택 κΈ°λŠ₯ 뢙이면 ꡐ체
64+
eventCategory: sticker.toUpperCase(),
65+
startDateTime: new Date().toISOString(),
4366
endDateTime: new Date().toISOString(),
4467
isAllDay: true,
4568
});
@@ -54,8 +77,11 @@ export default function CalendarNewPage() {
5477

5578
return (
5679
<main className="mx-auto w-full max-w-[420px]">
57-
<Header showBack onBack={() => router.push('/calendar')} value="일정 λ“±λ‘ν•˜κΈ°" />
58-
80+
<Header
81+
showBack
82+
onBack={() => router.push('/calendar')}
83+
value="일정 λ“±λ‘ν•˜κΈ°"
84+
/>
5985
<form onSubmit={onSubmit} className="px-[22px] pb-8">
6086
<Input
6187
type={titleStarted ? 'defaultStrong' : 'default'}
@@ -75,33 +101,37 @@ export default function CalendarNewPage() {
75101
onChange={setMemo}
76102
placeholder="κΈ°μ–΅ν•˜κ³  싢은 λ‚΄μš©μ„ μ μ–΄μ£Όμ„Έμš”."
77103
className="mt-3 w-full"
78-
textareaClassName="text-[14px]"
104+
textareaClassName="!text-[14px]"
79105
showCount
80106
/>
81107
<div className="mt-5 grid grid-cols-4 gap-2">
82108
{stickers.map((key) => {
83109
const active = sticker === key;
110+
const { w, h, className } = ICON_CFG[key];
84111
return (
85112
<button
86113
key={key}
87114
type="button"
88115
onClick={() => setSticker(key)}
116+
aria-pressed={active}
117+
aria-label={key}
89118
className={clsx(
90-
'h-18 w-18 rounded-xl border bg-white transition',
119+
'relative h-20 w-20 rounded-xl border bg-white transition',
91120
active
92121
? 'border-primary-400 ring-2 ring-primary-200'
93122
: 'border-gray-200 hover:bg-gray-50 active:scale-[0.98]',
94123
)}
95-
aria-pressed={active}
96124
>
97-
<Image
98-
src={STICKER_SRC[key]}
99-
alt={key}
100-
width={35}
101-
height={35}
102-
className="mx-auto"
103-
draggable={false}
104-
/>
125+
<span className="absolute inset-0 grid place-items-center">
126+
<Image
127+
src={STICKER_SRC[key]}
128+
alt={key}
129+
width={w}
130+
height={h}
131+
draggable={false}
132+
className={clsx('pointer-events-none', className)}
133+
/>
134+
</span>
105135
</button>
106136
);
107137
})}
@@ -110,9 +140,9 @@ export default function CalendarNewPage() {
110140
type="submit"
111141
disabled={disabled || loading}
112142
className={clsx(
113-
'mt-8 h-12 w-full rounded-2xl text-[15px] font-semibold transition',
143+
'mt-50 h-12 w-full rounded-2xl text-[15px] font-semibold transition',
114144
disabled || loading
115-
? 'bg-primary-200 text-rose-300 cursor-not-allowed'
145+
? 'bg-primary-200/40 text-rose-300 cursor-not-allowed'
116146
: 'bg-primary-500 text-white active:scale-[0.98]',
117147
)}
118148
>

β€Žsrc/app/(main)/calendar/page.tsxβ€Ž

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ export default function CalendarPage() {
2121
const [activeYmd, setActiveYmd] = useState<string | null>(null);
2222
const [mode, setMode] = useState<Mode>('schedule');
2323

24-
const { maps } = useCalendarRange(base, mode === 'schedule' ? 'USER' : 'ADMIN');
24+
const { maps } = useCalendarRange(
25+
base,
26+
mode === 'schedule' ? 'USER' : 'ADMIN',
27+
);
2528

2629
const d = dday(WEDDING_YMD);
2730
const openDay = (date: Date) => setActiveYmd(toYMD(date));
@@ -70,13 +73,15 @@ export default function CalendarPage() {
7073
κ²°ν˜ΌκΉŒμ§€ <span className="text-primary-500">D-{d}</span>
7174
</p>
7275
</div>
73-
<p className="mt-1 !text-sm text-gray-500">λκΉŒμ§€ 웨딧이 ν•¨κ»˜ ν• κ²Œμš” :)</p>
76+
<p className="mt-1 !text-sm text-gray-500">
77+
λκΉŒμ§€ 웨딧이 ν•¨κ»˜ ν• κ²Œμš” :)
78+
</p>
7479
<div className="mt-4">
7580
<SummaryCard />
7681
</div>
7782
</section>
7883

79-
<section className="mt-2 pb-8">
84+
<section className="mt-8 pb-8">
8085
<MonthSlider
8186
base={base}
8287
setBase={setBase}
@@ -94,4 +99,4 @@ export default function CalendarPage() {
9499
/>
95100
</main>
96101
);
97-
}
102+
}

β€Žsrc/app/(main)/mypage/invite/editor/gallery/page.tsxβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Header from '@/components/common/monocules/Header';
88
import { useRouter, useSearchParams } from 'next/navigation';
99
import { useS3MultiUpload } from '@/hooks/useS3MultiUpload';
1010
import { useQueryClient } from '@tanstack/react-query';
11+
import LottiePlayer from '@/components/common/atomic/LottiePlayer';
1112

1213
const PER_PAGE = 9;
1314
const TOTAL = 27;
@@ -207,7 +208,9 @@ export default function Page() {
207208
<br />
208209
예쁘게 λ‹΄λŠ” μ€‘μ΄μ—μš”
209210
</div>
210-
<div className="absolute left-1/2 -translate-x-1/2 top-[80px] w-36 h-32 bg-zinc-300 rounded-md" />
211+
<div className="absolute left-1/2 -translate-x-1/2 top-[80px] w-36 h-32">
212+
<LottiePlayer src="/loading.json" className="w-full h-full" />
213+
</div>
211214
</div>
212215
</div>
213216
)}

0 commit comments

Comments
Β (0)