3
3
import { useEffect } from 'react' ;
4
4
import Image from 'next/image' ;
5
5
import { useRouter } from 'next/navigation' ;
6
- // import lottieJson from '@/assets/lotties/lottieExample .json';
6
+ import lottieJson from '@/assets/lotties/coin-double .json' ;
7
7
import Button from '@/components/Button/Button' ;
8
8
import { ROUTER } from '@/constants/router' ;
9
9
import { NATIVE_METHODS } from '@/utils/nativeMethod' ;
10
10
import { css } from '@styled-system/css' ;
11
- // import Lottie from 'react-lottie-player';
11
+ import Lottie from 'react-lottie-player' ;
12
12
13
13
export default function MissionSuccessPage ( ) {
14
14
const router = useRouter ( ) ;
@@ -20,11 +20,13 @@ export default function MissionSuccessPage() {
20
20
21
21
return (
22
22
< main className = { mainWrapperCss } >
23
+ < Image className = { gradientCss } src = "/images/bg-gradient.png" alt = "success" fill />
23
24
< div className = { containerCss } >
24
25
< div className = { contentWrapperCss } >
26
+ < Lottie className = { lottieCss } loop animationData = { lottieJson } play />
27
+
25
28
< 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 />
28
30
</ div >
29
31
< div className = { titleWrapperCss } >
30
32
< span className = { titleCss } > 오늘의 미션완료!</ span >
@@ -41,11 +43,31 @@ export default function MissionSuccessPage() {
41
43
) ;
42
44
}
43
45
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
+
44
65
const mainWrapperCss = css ( {
45
66
display : 'flex' ,
46
67
flexDirection : 'column' ,
47
68
backgroundColor : 'bg.surface2' ,
48
69
height : '100vh' ,
70
+ position : 'relative' ,
49
71
} ) ;
50
72
51
73
const buttonWrapperCss = css ( {
@@ -66,6 +88,7 @@ const contentWrapperCss = css({
66
88
display : 'flex' ,
67
89
flexDirection : 'column' ,
68
90
animation : 'fadeIn 0.3s linear' ,
91
+ position : 'relative' ,
69
92
} ) ;
70
93
71
94
const titleWrapperCss = css ( {
@@ -87,11 +110,17 @@ const subTitleCss = css({
87
110
color : 'text.secondary' ,
88
111
} ) ;
89
112
113
+ const imageCss = css ( {
114
+ width : '50%' ,
115
+ background : 'transparent' ,
116
+ } ) ;
117
+
90
118
const lottieWrapperCss = css ( {
91
119
position : 'relative' ,
92
120
minHeight : '260px' ,
93
121
maxWidth : '100vw' ,
94
- width : '100%' ,
122
+ margin : '24px auto 0 auto' ,
123
+ width : '50%' ,
95
124
'& img' : {
96
125
objectFit : 'contain' ,
97
126
} ,
0 commit comments