-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
70 lines (65 loc) · 1.58 KB
/
App.js
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
66
67
68
69
70
import React, { useState } from 'react';
import { View, Text, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
const HomeScreen = () => {
const [username, setUsername] = useState('');
const handleLogin = () => {
// Giriş işlemleri burada yapılır
// Örneğin, kullanıcı adı ve şifre kontrolü
// Eğer başarılıysa kullanıcı adını kaydedebiliriz
};
return (
<View style={styles.container}>
<Text style={styles.heading}>DietMaster</Text>
<Text style={styles.title}>Hoş Geldiniz</Text>
<TextInput
style={styles.input}
placeholder="Kullanıcı Adı"
value={username}
onChangeText={setUsername}
/>
<TouchableOpacity style={styles.button} onPress={handleLogin}>
<Text style={styles.buttonText}>Giriş Yap</Text>
</TouchableOpacity>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
title: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 20,
},
heading: {
fontSize: 50,
fontWeight: 'bold',
marginBottom: 300,
color: '#3399FF'
},
input: {
width: 250,
height: 40,
borderWidth: 1,
borderColor: '#ccc',
borderRadius: 8,
paddingHorizontal: 10,
marginBottom: 20,
},
button: {
backgroundColor: 'blue',
paddingVertical: 12,
paddingHorizontal: 40,
borderRadius: 8,
},
buttonText: {
color: 'white',
fontSize: 18,
fontWeight: 'bold',
},
});
export default HomeScreen;