-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHomeScreen.js
More file actions
66 lines (58 loc) · 1.8 KB
/
HomeScreen.js
File metadata and controls
66 lines (58 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import React, { useState, useEffect } from 'react';
import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator, Image } from 'react-native';
// import * as MediaLibrary from 'expo-media-library';
// import * as FileSystem from 'expo-file-system';
// import * as ImageManipulator from 'expo-image-manipulator';
// import axios from 'axios';
//
export default function HomeScreen({ setCurrentScreen }) {
useEffect(() => {
}, []);
const moveToChat = () => {
// 이미지 처리 후 채팅 화면으로 전환
setCurrentScreen('Profile');
}
return (
// https://ibb.co/vJ6RND8
<View style={styles.container}>
<>
<Image source={require('./assets/img/PillForMe.png')} style={styles.image} />
<TouchableOpacity style={styles.button} onPress={moveToChat}>
<Text style={styles.buttonText}>✨ 나를 위한 {'\n'} 맞춤 영양제 조합 찾기!</Text>
</TouchableOpacity>
</>
</View>
);
}
const styles = StyleSheet.create({
image: {
width: '100%', // 이미지의 너비
height: 380, // 이미지의 높이
resizeMode: 'contain', // 이미지의 비율 유지
margin: 10
},
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
},
button: {
backgroundColor: 'white',
borderColor: '#69FFEF',
padding: 10,
margin: 5,
borderWidth: 5,
borderRadius: 150,
width: 240,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.25,
shadowRadius: 3.84,
elevation: 5,
},
buttonText: {
color: '#08222D',
textAlign: 'center',
fontSize: 18
}
});