-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyPlants.js
More file actions
39 lines (37 loc) · 1 KB
/
MyPlants.js
File metadata and controls
39 lines (37 loc) · 1 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
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import MyPlantList from './myPlantList.js';
function MyPlants({ myPlants, getMyPlants }) {
const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
alignItems: 'center',
paddingTop: 100,
},
title: {
paddingBottom: 20,
fontWeight: 'bold',
fontSize: 22,
},
paraText: {
paddingBottom: 20,
fontSize: 14,
},
});
return (
<View style={styles.container}>
{myPlants && myPlants.length !== 0 ? (
<View style={styles.container}>
<Text style={styles.title}>Welcome back to your plant fam!</Text>
<Text style={styles.paraText}>Check the watering schedule</Text>
<MyPlantList myPlants={myPlants} getMyPlants={getMyPlants} />
</View>
) : (
<View>
<Text>No plants found! Create a new one to get started.</Text>
</View>
)}
</View>
);
}
export default MyPlants;