Skip to content

Commit d84ff8b

Browse files
authored
Merge pull request #13 from Nexters/feat/meet-invite-page-animate
feat: 만남 초대장 페이지 애니메이션, 그라데이션 수정
2 parents ddbfd9a + e75e43c commit d84ff8b

File tree

12 files changed

+100
-77
lines changed

12 files changed

+100
-77
lines changed
1.09 MB
Binary file not shown.
1.09 MB
Binary file not shown.
1.5 MB
Binary file not shown.
-774 KB
Binary file not shown.
1.51 MB
Binary file not shown.
-758 KB
Binary file not shown.
1.5 MB
Binary file not shown.
-747 KB
Binary file not shown.

apps/tuk-web/src/app/invite/meet/src/components/GradientBackground.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const GradientBackground = () => {
55

66
<div className="pointer-events-none absolute left-[83px] top-[196px] h-[610px] w-[618px] rotate-[82deg] rounded-full bg-gradient-to-br from-[#DCC9F7] to-[#94C1D3] opacity-60 blur-[180px]" />
77

8-
<div className="pointer-events-none absolute left-[61px] top-[542px] h-[449px] w-[423px] rotate-[82deg] rounded-full bg-gradient-to-br from-[#DCC8F8] to-white opacity-50 blur-[120px]" />
8+
<div className="pointer-events-none absolute left-[61px] top-[542px] h-[449px] w-[423px] rotate-[82deg] rounded-full bg-gradient-to-br from-[#DCC8F8] to-white-default opacity-50 blur-[120px]" />
99
</>
1010
);
1111
};

apps/tuk-web/src/app/invite/meet/src/components/InviteMeet.tsx

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const BANNER_RESHOW_MINUTES = 30;
1111

1212
const InviteMeet = () => {
1313
const [showBanner, setShowBanner] = useState(false);
14+
const [animateCardIn, setAnimateCardIn] = useState(false);
1415

1516
const handleCloseBanner = () => {
1617
localStorage.setItem(BANNER_KEY, Date.now().toString());
@@ -23,19 +24,21 @@ const InviteMeet = () => {
2324

2425
if (!dismissedAt) {
2526
setShowBanner(true);
26-
return;
27+
} else {
28+
const dismissedTime = parseInt(dismissedAt, 10);
29+
const thirtyMinutes = BANNER_RESHOW_MINUTES * 60 * 1000;
30+
if (now - dismissedTime > thirtyMinutes) {
31+
setShowBanner(true);
32+
}
2733
}
2834

29-
const dismissedTime = parseInt(dismissedAt, 10);
30-
const thirtyMinutes = BANNER_RESHOW_MINUTES * 60 * 1000;
35+
const timeout = setTimeout(() => setAnimateCardIn(true), 100);
3136

32-
if (now - dismissedTime > thirtyMinutes) {
33-
setShowBanner(true);
34-
}
37+
return () => clearTimeout(timeout);
3538
}, []);
3639

3740
return (
38-
<div className="relative h-screen w-full overflow-y-auto bg-gradient-to-b from-white-default to-[#DCC8F8] px-5">
41+
<div className="relative w-full overflow-y-auto overflow-x-hidden bg-gradient-to-b from-white-default to-[#DCC8F8] px-5">
3942
<GradientBackground />
4043

4144
{showBanner && (
@@ -46,23 +49,23 @@ const InviteMeet = () => {
4649
</button>
4750
<div className="flex gap-2.5">
4851
<div className="size-10 rounded-[0.3125rem] bg-gray-500" />
49-
<p className="text-body-14-R">
52+
<p className="pretendard-body-14-R">
5053
앱을 다운받고 편하게 만남을
5154
<br />
5255
이어나가보세요
5356
</p>
5457
</div>
5558
</div>
5659

57-
<div className="rounded-[1.25rem] bg-white-default px-2.5 py-2 text-body-12-B text-black-500">
60+
<div className="pretendard-body-12-B rounded-[1.25rem] bg-white-default px-2.5 py-2 text-black-500">
5861
앱으로 열기
5962
</div>
6063
</div>
6164
)}
6265

6366
<h2
6467
className={cn(
65-
'text-title-22-M text-black-500',
68+
'serif-title-22-M font-bold text-black-500',
6669
showBanner ? 'mt-[6.875rem]' : 'mt-[1.875rem]'
6770
)}
6871
>
@@ -72,29 +75,34 @@ const InviteMeet = () => {
7275
</h2>
7376

7477
<div className="relative mt-12 flex justify-center">
75-
<div className="relative h-[23.125rem] w-[16.25rem] rounded-[0.625rem] bg-[#f0f1f3] px-4 py-3">
78+
<div
79+
className={cn(
80+
'relative h-[23.125rem] w-[16.25rem] rounded-[0.625rem] bg-[#f0f1f3] px-4 py-3 transition-all duration-700 ease-out',
81+
animateCardIn ? 'translate-y-0 opacity-100' : 'translate-y-12 opacity-0'
82+
)}
83+
>
7684
<div className="flex justify-end">
77-
<p className="text-body-14-R text-gray-800">
85+
<p className="serif-body-14-R text-gray-800">
7886
다음 만남은 계획대로
7987
<br />
8088
되지 않아 친구들에게
8189
</p>
8290
</div>
8391

84-
<div className="mt-16">
92+
<div className="mt-[4.375rem]">
8593
<QuoteIcon />
86-
<div className="mt-6 flex flex-col gap-2">
87-
<p className="text-body-16-M text-black-500">제주도 여행가서</p>
88-
<p className="text-body-16-M text-black-500">새벽 4시까지</p>
89-
<p className="text-body-16-M text-black-500">전생 이야기 나누기</p>
94+
<div className="mt-[0.8125rem] flex flex-col gap-[0.3125rem]">
95+
<p className="serif-body-16-M text-black-500">제주도 여행가서</p>
96+
<p className="serif-body-16-M text-black-500">새벽 4시까지</p>
97+
<p className="serif-body-16-M text-black-500">전생 이야기 나누기</p>
9098
</div>
9199

92-
<p className="mt-6 text-body-16-M text-black-500">어때</p>
100+
<p className="serif-body-16-M mt-5 text-black-500">어때</p>
93101
</div>
94102

95103
<div className="absolute bottom-0 left-0 flex w-full justify-between px-4 pb-4">
96-
<p className="text-body-12-R text-[#cccccc]">연락이</p>
97-
<p className="text-body-12-R text-[#cccccc]">뜸해진 우리</p>
104+
<p className="serif-body-12-R text-[#cccccc]">연락이</p>
105+
<p className="serif-body-12-R text-[#cccccc]">뜸해진 우리</p>
98106
</div>
99107
</div>
100108

@@ -103,11 +111,11 @@ const InviteMeet = () => {
103111
</div>
104112
</div>
105113

106-
<div className="mt-[4.125rem] flex justify-center">
114+
<div className="mt-[4.125rem] flex justify-center pb-[2.8125rem]">
107115
<TukLogo />
108116
</div>
109117

110-
<div className="fixed bottom-4 left-0 z-30 w-full px-4">
118+
<div className="fixed bottom-0 left-0 z-30 w-full bg-gradient-to-b from-white-default/0 to-white-default px-5 py-6">
111119
<Button className="w-full">초대장 확인하기</Button>
112120
</div>
113121
</div>

0 commit comments

Comments
 (0)