-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0bfc32
commit 5e1ba17
Showing
12 changed files
with
96 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,50 @@ | ||
import React, {useState} from 'react'; | ||
import { View, Image, Text, FlatList } from 'react-native'; | ||
import { ListItem, Card } from 'react-native-elements' | ||
import { | ||
View, Image, Text, FlatList, | ||
} from 'react-native'; | ||
import React, { useState } from 'react'; | ||
import { ListItem, Card } from 'react-native-elements'; | ||
import styles from './styles'; | ||
|
||
const Label = ({name}) =>{ | ||
return ( | ||
<View style={styles.labelView}><Text style={styles.labelText}>{name.item}</Text></View> | ||
)}; | ||
const Label = ({ name }) => ( | ||
<View style={styles.labelView}><Text style={styles.labelText}>{name.item}</Text></View> | ||
); | ||
|
||
const Project = props => | ||
{ | ||
const project = props.project; | ||
const {projectName, ownerName, avatar, labels} = project.item; | ||
const Project = (props) => { | ||
const { project } = props; | ||
const { | ||
projectName, ownerName, labels, | ||
} = project.item; | ||
|
||
return( | ||
return ( | ||
<Card containerStyle={styles.card}> | ||
<ListItem | ||
title={ | ||
<Text style={styles.projectName}>{projectName}</Text> | ||
<ListItem | ||
title={ | ||
<Text style={styles.projectName}>{projectName}</Text> | ||
} | ||
subtitle={ | ||
<> | ||
<Text style={styles.ownerName}> | ||
{ownerName} | ||
</Text> | ||
<View style={styles.labelList}> | ||
<FlatList horizontal data={labels} keyExtractor={(item, index) => index.toString()} renderItem={(label) => <Label name={label} />}/> | ||
</View> | ||
</> | ||
} | ||
leftAvatar={( | ||
<Image style={styles.image} source={require('../../../assets/icon.png')} /> | ||
subtitle={( | ||
<> | ||
<Text style={styles.ownerName}> | ||
{ownerName} | ||
</Text> | ||
<View style={styles.labelList}> | ||
<FlatList | ||
horizontal | ||
data={labels} | ||
keyExtractor={(item, index) => index.toString()} | ||
renderItem={(label) => <Label name={label} />} | ||
/> | ||
</View> | ||
</> | ||
)} | ||
leftAvatar={( | ||
<Image | ||
style={styles.image} | ||
source={require('../../../assets/icon.png')} | ||
/> | ||
)} | ||
/> | ||
/> | ||
</Card> | ||
); | ||
); | ||
}; | ||
|
||
export default Project; | ||
export default Project; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters