Add profile, group, and Courses cards
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user