MCPcopy Create free account
hub / github.com/callstack/react-native-paper / TeamsList

Function TeamsList

example/src/Examples/TeamsList.tsx:13–44  ·  view source on GitHub ↗
({ navigation }: Props)

Source from the content-addressed store, hash-verified

11type Props = StackScreenProps<ParamListBase>;
12
13const 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
46const styles = StyleSheet.create({
47 content: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…