MCPcopy Index your code
hub / github.com/gitpoint/git-point / IssueListItem

Function IssueListItem

src/components/issue-list-item.component.js:73–118  ·  view source on GitHub ↗
({ type, issue, navigation, locale }: Props)

Source from the content-addressed store, hash-verified

71};
72
73export const IssueListItem = ({ type, issue, navigation, locale }: Props) => (
74 <TouchableHighlight
75 style={issue.state === 'closed' && styles.closedIssue}
76 onPress={() =>
77 navigation.navigate('Issue', {
78 issue,
79 isPR: !!issue.pull_request,
80 locale,
81 })
82 }
83 underlayColor={colors.greyLight}
84 >
85 <View style={styles.container}>
86 <ListItem
87 containerStyle={styles.listItemContainer}
88 title={issue.title}
89 subtitle={
90 issue.state === 'open'
91 ? t('#{number} opened {time} ago by {user}', locale, {
92 number: issue.number,
93 user: issue.user.login,
94 time: relativeTimeToNow(issue.created_at),
95 })
96 : t('#{number} by {user} was closed {time} ago', locale, {
97 number: issue.number,
98 user: issue.user.login,
99 time: relativeTimeToNow(issue.closed_at),
100 })
101 }
102 leftIcon={{
103 name: getIconName(type, issue),
104 size: 36,
105 color: getIconColor(issue),
106 type: 'octicon',
107 }}
108 hideChevron
109 titleStyle={styles.title}
110 subtitleStyle={styles.subtitle}
111 />
112 <View style={styles.commentsContainer}>
113 <Icon name="comment" type="octicon" size={18} color={colors.grey} />
114 <Text style={styles.comments}>{issue.comments}</Text>
115 </View>
116 </View>
117 </TouchableHighlight>
118);

Callers

nothing calls this directly

Calls 4

tFunction · 0.90
relativeTimeToNowFunction · 0.90
getIconNameFunction · 0.85
getIconColorFunction · 0.85

Tested by

no test coverage detected