({ navigation }: Props)
| 11 | type Props = StackScreenProps<ParamListBase>; |
| 12 | |
| 13 | const TeamsList = ({ navigation }: Props) => { |
| 14 | return ( |
| 15 | <ScreenWrapper contentContainerStyle={styles.content}> |
| 16 | <DataTable> |
| 17 | <DataTable.Header> |
| 18 | <DataTable.Title style={styles.first}>Team</DataTable.Title> |
| 19 | <DataTable.Title numeric>MP</DataTable.Title> |
| 20 | <DataTable.Title numeric>G</DataTable.Title> |
| 21 | <DataTable.Title numeric>PTS</DataTable.Title> |
| 22 | </DataTable.Header> |
| 23 | |
| 24 | {teamsList.map((item) => ( |
| 25 | <DataTable.Row |
| 26 | key={item.key} |
| 27 | onPress={() => |
| 28 | navigation.navigate('teamDetails', { |
| 29 | sourceColor: item.name.split(' ')[1].toLowerCase(), |
| 30 | headerTitle: item.name, |
| 31 | darkMode: item.darkMode, |
| 32 | }) |
| 33 | } |
| 34 | > |
| 35 | <DataTable.Cell style={styles.first}>{item.name}</DataTable.Cell> |
| 36 | <DataTable.Cell numeric>{item.matchesPlayed}</DataTable.Cell> |
| 37 | <DataTable.Cell numeric>{item.goals}</DataTable.Cell> |
| 38 | <DataTable.Cell numeric>{item.points}</DataTable.Cell> |
| 39 | </DataTable.Row> |
| 40 | ))} |
| 41 | </DataTable> |
| 42 | </ScreenWrapper> |
| 43 | ); |
| 44 | }; |
| 45 | |
| 46 | const styles = StyleSheet.create({ |
| 47 | content: { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…