forked from mergeos-bounties/PlantGuide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
53 lines (49 loc) · 1.22 KB
/
Copy pathApp.js
File metadata and controls
53 lines (49 loc) · 1.22 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
import React, { useState } from 'react';
import { StyleSheet, Text, View, Button, Image } from 'react-native';
export default function App() {
const [result, setResult] = useState(null);
const mockIdentify = () => {
setResult("Identified: Monstera Deliciosa. Care: Medium indirect light.");
};
return (
<View style={styles.container}>
<Text style={styles.title}>PlantGuide Mobile</Text>
<View style={styles.placeholder}>
<Text style={styles.placeholderText}>Camera View Placeholder</Text>
</View>
<Button title="Identify Plant" onPress={mockIdentify} />
{result && <Text style={styles.result}>{result}</Text>}
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
padding: 20,
},
title: {
fontSize: 24,
fontWeight: 'bold',
marginBottom: 20,
},
placeholder: {
width: 300,
height: 300,
backgroundColor: '#eee',
justifyContent: 'center',
alignItems: 'center',
marginBottom: 20,
},
placeholderText: {
color: '#888',
},
result: {
marginTop: 20,
fontSize: 16,
color: 'green',
textAlign: 'center',
}
});