-
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.
Merge pull request #414 from wyne/reorder-players
Reorder players
- Loading branch information
Showing
21 changed files
with
531 additions
and
224 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
|
||
import { getAnalytics } from '@react-native-firebase/analytics'; | ||
import { ParamListBase, RouteProp } from '@react-navigation/native'; | ||
import { NativeStackNavigationProp } from '@react-navigation/native-stack'; | ||
import { StyleSheet, Text } from 'react-native'; | ||
|
||
import { systemBlue } from '../../constants'; | ||
import HeaderButton from '../Buttons/HeaderButton'; | ||
|
||
import CustomHeader from './CustomHeader'; | ||
|
||
type RouteParams = { | ||
EditPlayer: { | ||
index: number | undefined; | ||
playerId: string | undefined; | ||
}; | ||
}; | ||
|
||
interface EditPlayerScreenProps { | ||
navigation: NativeStackNavigationProp<ParamListBase, string, undefined>; | ||
route: RouteProp<RouteParams, 'EditPlayer'>; | ||
} | ||
|
||
const EditPlayerHeader: React.FunctionComponent<EditPlayerScreenProps> = ({ navigation }) => { | ||
return ( | ||
<CustomHeader navigation={navigation} | ||
headerLeft={ | ||
<HeaderButton accessibilityLabel='EditPlayerBack' onPress={async () => { | ||
navigation.goBack(); | ||
await getAnalytics().logEvent('edit_player_back'); | ||
}}> | ||
<Text style={{ color: systemBlue, fontSize: 20 }}>Back</Text> | ||
</HeaderButton> | ||
} | ||
headerCenter={<Text style={styles.title}>Edit Player</Text>} | ||
/> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
title: { | ||
color: 'white', | ||
fontSize: 20, | ||
fontVariant: ['tabular-nums'], | ||
}, | ||
}); | ||
|
||
export default EditPlayerHeader; |
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
Oops, something went wrong.