Display clubs the user is a manager of in first

This commit is contained in:
Arnaud Vergnet 2020-04-10 00:37:51 +02:00
parent ebbd4df591
commit 8563fea835

View file

@ -269,6 +269,8 @@ class ProfileScreen extends React.Component<Props, State> {
clubKeyExtractor = (item: Object) => item.name;
sortClubList = (a: Object, b: Object) => a.is_manager ? -1 : 1;
/**
* Renders the list of clubs the user is part of
*
@ -276,6 +278,7 @@ class ProfileScreen extends React.Component<Props, State> {
* @return {*}
*/
getClubList(list: Array<Object>) {
list.sort(this.sortClubList);
return (
//$FlowFixMe
<FlatList