Skip to content

Commit b1430fe

Browse files
authored
Merge pull request #557 from depromeet/develop
배포용 PR
2 parents aa1b2ab + 9821c0a commit b1430fe

File tree

6 files changed

+78
-11
lines changed

6 files changed

+78
-11
lines changed

public/images/bg-gradient.png

2.07 MB
Loading

public/images/coin.png

2.26 MB
Loading

src/app/guest/mission/success/page.tsx

+43-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use client';
2+
import Image from 'next/image';
23
import { useRouter } from 'next/navigation';
3-
import lottieJson from '@/assets/lotties/lottieExample.json';
4+
import lottieJson from '@/assets/lotties/coin-double.json';
45
import Button from '@/components/Button/Button';
56
import { ROUTER } from '@/constants/router';
67
import { css } from '@styled-system/css';
@@ -13,14 +14,17 @@ export default function GuestMissionSuccessPage() {
1314
return (
1415
<main className={mainWrapperCss}>
1516
<div className={containerCss}>
17+
<Image className={gradientCss} src="/images/bg-gradient.png" alt="success" fill />
1618
<div className={contentWrapperCss}>
19+
<Lottie className={lottieCss} loop animationData={lottieJson} play />
20+
21+
<div className={lottieWrapperCss}>
22+
<Image className={imageCss} src="/images/coin.png" alt="success" fill />
23+
</div>
1724
<div className={titleWrapperCss}>
1825
<span className={titleCss}>오늘의 미션완료!</span>
1926
<span className={subTitleCss}>{'잘 하셨어요, 오늘도 한 걸음 성장하셨네요 :)'}</span>
2027
</div>
21-
<div className={lottieWrapperCss}>
22-
<Lottie loop animationData={lottieJson} play />
23-
</div>
2428
</div>
2529
<Button type="button" size="large" variant="primary" onClick={onClickConfirmButton}>
2630
<span className={buttonTextCss}>10분만 제대로 즐기기</span>
@@ -30,6 +34,30 @@ export default function GuestMissionSuccessPage() {
3034
);
3135
}
3236

37+
const gradientCss = css({
38+
height: '100vh',
39+
width: '100%',
40+
maxWidth: 'maxWidth',
41+
position: 'absolute',
42+
top: '0',
43+
objectFit: 'cover',
44+
backgroundPosition: 'center',
45+
left: '0',
46+
});
47+
48+
const lottieCss = css({
49+
position: 'absolute',
50+
top: '0',
51+
left: '0',
52+
width: '100%',
53+
height: '100%',
54+
});
55+
56+
const imageCss = css({
57+
width: '50%',
58+
background: 'transparent',
59+
});
60+
3361
const mainWrapperCss = css({
3462
display: 'flex',
3563
flexDirection: 'column',
@@ -38,6 +66,7 @@ const mainWrapperCss = css({
3866
});
3967

4068
const containerCss = css({
69+
position: 'relative',
4170
display: 'flex',
4271
flex: 1,
4372
flexDirection: 'column',
@@ -70,7 +99,16 @@ const subTitleCss = css({
7099
color: 'text.secondary',
71100
});
72101

73-
const lottieWrapperCss = css({});
102+
const lottieWrapperCss = css({
103+
position: 'relative',
104+
minHeight: '260px',
105+
maxWidth: '100vw',
106+
margin: '24px auto 0 auto',
107+
width: '50%',
108+
'& img': {
109+
objectFit: 'contain',
110+
},
111+
});
74112

75113
const buttonTextCss = css({
76114
textStyle: 'subtitle4',

src/app/record/success/page.tsx

+34-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import { useEffect } from 'react';
44
import Image from 'next/image';
55
import { useRouter } from 'next/navigation';
6-
// import lottieJson from '@/assets/lotties/lottieExample.json';
6+
import lottieJson from '@/assets/lotties/coin-double.json';
77
import Button from '@/components/Button/Button';
88
import { ROUTER } from '@/constants/router';
99
import { NATIVE_METHODS } from '@/utils/nativeMethod';
1010
import { css } from '@styled-system/css';
11-
// import Lottie from 'react-lottie-player';
11+
import Lottie from 'react-lottie-player';
1212

1313
export default function MissionSuccessPage() {
1414
const router = useRouter();
@@ -20,11 +20,13 @@ export default function MissionSuccessPage() {
2020

2121
return (
2222
<main className={mainWrapperCss}>
23+
<Image className={gradientCss} src="/images/bg-gradient.png" alt="success" fill />
2324
<div className={containerCss}>
2425
<div className={contentWrapperCss}>
26+
<Lottie className={lottieCss} loop animationData={lottieJson} play />
27+
2528
<div className={lottieWrapperCss}>
26-
<Image src="/assets/mission/10mm-success.svg" alt="success" fill />
27-
{/* <Lottie loop animationData={lottieJson} play /> */}
29+
<Image className={imageCss} src="/images/coin.png" alt="success" fill />
2830
</div>
2931
<div className={titleWrapperCss}>
3032
<span className={titleCss}>오늘의 미션완료!</span>
@@ -41,11 +43,31 @@ export default function MissionSuccessPage() {
4143
);
4244
}
4345

46+
const lottieCss = css({
47+
position: 'absolute',
48+
top: '0',
49+
left: '0',
50+
width: '100%',
51+
height: '100%',
52+
});
53+
54+
const gradientCss = css({
55+
height: '100vh',
56+
width: '100%',
57+
maxWidth: 'maxWidth',
58+
position: 'absolute',
59+
top: '0',
60+
objectFit: 'cover',
61+
backgroundPosition: 'center',
62+
left: '0',
63+
});
64+
4465
const mainWrapperCss = css({
4566
display: 'flex',
4667
flexDirection: 'column',
4768
backgroundColor: 'bg.surface2',
4869
height: '100vh',
70+
position: 'relative',
4971
});
5072

5173
const buttonWrapperCss = css({
@@ -66,6 +88,7 @@ const contentWrapperCss = css({
6688
display: 'flex',
6789
flexDirection: 'column',
6890
animation: 'fadeIn 0.3s linear',
91+
position: 'relative',
6992
});
7093

7194
const titleWrapperCss = css({
@@ -87,11 +110,17 @@ const subTitleCss = css({
87110
color: 'text.secondary',
88111
});
89112

113+
const imageCss = css({
114+
width: '50%',
115+
background: 'transparent',
116+
});
117+
90118
const lottieWrapperCss = css({
91119
position: 'relative',
92120
minHeight: '260px',
93121
maxWidth: '100vw',
94-
width: '100%',
122+
margin: '24px auto 0 auto',
123+
width: '50%',
95124
'& img': {
96125
objectFit: 'contain',
97126
},

src/assets/lotties/coin-double.json

+1
Large diffs are not rendered by default.

src/assets/lotties/lottieExample.json

-1
This file was deleted.

0 commit comments

Comments
 (0)