File tree 9 files changed +148
-34
lines changed
9 files changed +148
-34
lines changed Original file line number Diff line number Diff line change @@ -20,37 +20,26 @@ import {
20
20
type Props = NativeStackScreenProps < RootStackParamList , "Home" > ;
21
21
22
22
const Home = ( { navigation } : Props ) => {
23
- // TODO: 환경변수로 빼려고 합니다.
24
- const host = `http://192.168.35.250:19000` ;
25
-
26
- const logoURI = `${ host } /src/assets/image/logo.png` ;
27
- const laughGroupURI = `${ host } /src/assets/image/laugh-group.png` ;
28
- const upperArrowURI = `${ host } /src/assets/image/upper-arrow.png` ;
29
- const slideToPivotingURI = `${ host } /src/assets/image/slide-to-pivoting.png` ;
30
- const profileImageURI = `${ host } /src/assets/image/profile-image.png` ;
31
23
const waitingPeople = 65 ;
32
24
33
25
return (
34
26
< Container >
35
27
< IntroSection >
36
- < Logo source = { { uri : logoURI } } />
28
+ < Logo />
37
29
< InduceParagraph > 피보팅을{ "\n" } 시작해보세요</ InduceParagraph >
38
30
< WaitingParagraph >
39
31
현재 < Bold > { waitingPeople } 명</ Bold > 이 대기중이에요
40
32
</ WaitingParagraph >
41
- < ProfileImage source = { { uri : profileImageURI } } />
33
+ < ProfileImage />
42
34
</ IntroSection >
43
35
44
- < LaughGroup source = { { uri : laughGroupURI } } resizeMode = "contain" />
36
+ < LaughGroup />
45
37
46
38
< TouchableOpacity onPress = { ( ) => navigation . navigate ( "Matching" ) } >
47
- < SlideToPivoting
48
- source = { { uri : slideToPivotingURI } }
49
- resizeMode = "contain"
50
- />
39
+ < SlideToPivoting />
51
40
</ TouchableOpacity >
52
41
53
- < UpperArrow source = { { uri : upperArrowURI } } />
42
+ < UpperArrow />
54
43
</ Container >
55
44
) ;
56
45
} ;
Original file line number Diff line number Diff line change 1
1
import styled from "styled-components/native" ;
2
2
3
+ import LaughGroupSVG from "../../assets/image/laugh-group.svg" ;
4
+ import LogoSVG from "../../assets/image/logo.svg" ;
5
+ import ProfileImageSVG from "../../assets/image/profile-image.svg" ;
6
+ import SlideToPivotingSVG from "../../assets/image/slide-to-pivoting.svg" ;
7
+ import UpperArrowSVG from "../../assets/image/upper-arrow.svg" ;
8
+
3
9
export const Container = styled . View `
4
10
width: 100%;
5
11
height: 100%;
@@ -12,9 +18,7 @@ export const IntroSection = styled.View`
12
18
margin: 12% 4% 0 4%;
13
19
` ;
14
20
15
- export const Logo = styled . Image `
16
- width: 124px;
17
- height: 18px;
21
+ export const Logo = styled ( LogoSVG ) `
18
22
margin-bottom: 12%;
19
23
` ;
20
24
@@ -31,35 +35,27 @@ export const WaitingParagraph = styled.Text`
31
35
line-height: 27px;
32
36
` ;
33
37
34
- export const ProfileImage = styled . Image `
38
+ export const ProfileImage = styled ( ProfileImageSVG ) `
35
39
position: absolute;
36
40
right: 0;
37
41
bottom: 60px;
38
-
39
- width: 63px;
40
- height: 63px;
41
42
` ;
42
43
43
44
export const Bold = styled . Text `
44
45
font-weight: 700;
45
46
` ;
46
47
47
- export const LaughGroup = styled . Image `
48
- width: 100%;
49
- height: 41%;
48
+ export const LaughGroup = styled ( LaughGroupSVG ) `
50
49
margin-top: 5%;
51
50
` ;
52
51
53
- export const UpperArrow = styled . Image `
52
+ export const UpperArrow = styled ( UpperArrowSVG ) `
54
53
position: absolute;
55
54
align-self: center;
56
55
bottom: 5%;
57
-
58
- width: 12px;
59
- height: 4px;
60
56
` ;
61
57
62
- export const SlideToPivoting = styled . Image `
63
- height: 60px ;
58
+ export const SlideToPivoting = styled ( SlideToPivotingSVG ) `
59
+ margin: 0 auto ;
64
60
margin-top: 6%;
65
61
` ;
Original file line number Diff line number Diff line change 5
5
"esModuleInterop" : true ,
6
6
"isolatedModules" : true ,
7
7
"jsx" : " react-native" ,
8
- "lib" : [" es2017" ],
8
+ "lib" : [
9
+ " es2017"
10
+ ],
9
11
"moduleResolution" : " node" ,
10
12
"noEmit" : true ,
11
13
"strict" : true ,
16
18
" babel.config.js" ,
17
19
" metro.config.js" ,
18
20
" jest.config.js"
19
- ]
21
+ ],
22
+ "extends" : " expo/tsconfig.base"
20
23
}
You can’t perform that action at this time.
0 commit comments