Skip to content

Commit f494006

Browse files
committed
[#11] chore: HomePage SVG 사용하도록 수정
1 parent c0446d8 commit f494006

9 files changed

+148
-34
lines changed

src/assets/image/laugh-group.svg

+88
Loading

src/assets/image/logo.png

-1.67 KB
Binary file not shown.

src/assets/image/logo.svg

+12
Loading

src/assets/image/profile-image.svg

+9
Loading
+14
Loading

src/assets/image/upper-arrow.svg

+3
Loading

src/screens/Home/Home.tsx

+5-16
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,26 @@ import {
2020
type Props = NativeStackScreenProps<RootStackParamList, "Home">;
2121

2222
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`;
3123
const waitingPeople = 65;
3224

3325
return (
3426
<Container>
3527
<IntroSection>
36-
<Logo source={{ uri: logoURI }} />
28+
<Logo />
3729
<InduceParagraph>피보팅을{"\n"}시작해보세요</InduceParagraph>
3830
<WaitingParagraph>
3931
현재 <Bold>{waitingPeople}</Bold>이 대기중이에요
4032
</WaitingParagraph>
41-
<ProfileImage source={{ uri: profileImageURI }} />
33+
<ProfileImage />
4234
</IntroSection>
4335

44-
<LaughGroup source={{ uri: laughGroupURI }} resizeMode="contain" />
36+
<LaughGroup />
4537

4638
<TouchableOpacity onPress={() => navigation.navigate("Matching")}>
47-
<SlideToPivoting
48-
source={{ uri: slideToPivotingURI }}
49-
resizeMode="contain"
50-
/>
39+
<SlideToPivoting />
5140
</TouchableOpacity>
5241

53-
<UpperArrow source={{ uri: upperArrowURI }} />
42+
<UpperArrow />
5443
</Container>
5544
);
5645
};

src/screens/Home/style.ts

+12-16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import styled from "styled-components/native";
22

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+
39
export const Container = styled.View`
410
width: 100%;
511
height: 100%;
@@ -12,9 +18,7 @@ export const IntroSection = styled.View`
1218
margin: 12% 4% 0 4%;
1319
`;
1420

15-
export const Logo = styled.Image`
16-
width: 124px;
17-
height: 18px;
21+
export const Logo = styled(LogoSVG)`
1822
margin-bottom: 12%;
1923
`;
2024

@@ -31,35 +35,27 @@ export const WaitingParagraph = styled.Text`
3135
line-height: 27px;
3236
`;
3337

34-
export const ProfileImage = styled.Image`
38+
export const ProfileImage = styled(ProfileImageSVG)`
3539
position: absolute;
3640
right: 0;
3741
bottom: 60px;
38-
39-
width: 63px;
40-
height: 63px;
4142
`;
4243

4344
export const Bold = styled.Text`
4445
font-weight: 700;
4546
`;
4647

47-
export const LaughGroup = styled.Image`
48-
width: 100%;
49-
height: 41%;
48+
export const LaughGroup = styled(LaughGroupSVG)`
5049
margin-top: 5%;
5150
`;
5251

53-
export const UpperArrow = styled.Image`
52+
export const UpperArrow = styled(UpperArrowSVG)`
5453
position: absolute;
5554
align-self: center;
5655
bottom: 5%;
57-
58-
width: 12px;
59-
height: 4px;
6056
`;
6157

62-
export const SlideToPivoting = styled.Image`
63-
height: 60px;
58+
export const SlideToPivoting = styled(SlideToPivotingSVG)`
59+
margin: 0 auto;
6460
margin-top: 6%;
6561
`;

tsconfig.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"esModuleInterop": true,
66
"isolatedModules": true,
77
"jsx": "react-native",
8-
"lib": ["es2017"],
8+
"lib": [
9+
"es2017"
10+
],
911
"moduleResolution": "node",
1012
"noEmit": true,
1113
"strict": true,
@@ -16,5 +18,6 @@
1618
"babel.config.js",
1719
"metro.config.js",
1820
"jest.config.js"
19-
]
21+
],
22+
"extends": "expo/tsconfig.base"
2023
}

0 commit comments

Comments
 (0)