forked from vergnet/application-amicale
Display clubs the user is a manager of in first
This commit is contained in:
parent
ebbd4df591
commit
8563fea835
1 changed files with 3 additions and 0 deletions
|
@ -269,6 +269,8 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
|
|
||||||
clubKeyExtractor = (item: Object) => item.name;
|
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
|
* Renders the list of clubs the user is part of
|
||||||
*
|
*
|
||||||
|
@ -276,6 +278,7 @@ class ProfileScreen extends React.Component<Props, State> {
|
||||||
* @return {*}
|
* @return {*}
|
||||||
*/
|
*/
|
||||||
getClubList(list: Array<Object>) {
|
getClubList(list: Array<Object>) {
|
||||||
|
list.sort(this.sortClubList);
|
||||||
return (
|
return (
|
||||||
//$FlowFixMe
|
//$FlowFixMe
|
||||||
<FlatList
|
<FlatList
|
||||||
|
|
Loading…
Reference in a new issue