Add profile, group, and Courses cards

This commit is contained in:
aeroreyna
2022-03-19 09:28:02 -07:00
parent e5554c2f8e
commit 76ec6331f5
9 changed files with 401 additions and 43 deletions

View File

@@ -3,6 +3,7 @@ import { Searchbar } from 'react-native-paper';
import { View, ActivityIndicator, StyleSheet, SafeAreaView, FlatList } from 'react-native';
import API from "../API";
import UserName from "../components/UserName";
import GroupCard from "../components/GroupCard";
import ProfileSmallHeader from '../components/ProfileSmallHeader.js'
const Groups = () => {
@@ -35,16 +36,19 @@ const Groups = () => {
setQueryTimer(timerId);
};
const renderProfile = (({ item }) => {
return (<ProfileSmallHeader profileObj={item} />);
return (<GroupCard profileObj={item} />);
});
return (
<SafeAreaView style={styles.container}>
<SafeAreaView>
<Searchbar
placeholder="Search Users"
placeholder="Search Groups"
onChangeText={onChangeSearch}
value={searchQuery}
/>
<FlatList
contentContainerStyle={styles.container}
numColumns={2}
columnWrapperStyle={{justifyContent: "space-evenly"}}
data={groups}
renderItem={renderProfile}
keyExtractor={item => item._id}
@@ -57,7 +61,6 @@ export default Groups;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#edf2f7",
padding: 5,
},
});