Browse Source

change sorting function name

Arnaud Vergnet 2 years ago
parent
commit
0a28cf16e3
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      src/screens/Services/Proximo/ProximoMainScreen.tsx

+ 5
- 2
src/screens/Services/Proximo/ProximoMainScreen.tsx View File

65
   },
65
   },
66
 });
66
 });
67
 
67
 
68
-function sortFinalData(a: ProximoCategoryType, b: ProximoCategoryType): number {
68
+function sortCategories(
69
+  a: ProximoCategoryType,
70
+  b: ProximoCategoryType
71
+): number {
69
   const str1 = a.name.toLowerCase();
72
   const str1 = a.name.toLowerCase();
70
   const str2 = b.name.toLowerCase();
73
   const str2 = b.name.toLowerCase();
71
 
74
 
217
       return [
220
       return [
218
         {
221
         {
219
           title: '',
222
           title: '',
220
-          data: finalData.filter((c) => c.nb_articles > 0).sort(sortFinalData),
223
+          data: finalData.filter((c) => c.nb_articles > 0).sort(sortCategories),
221
           keyExtractor: getKeyExtractor,
224
           keyExtractor: getKeyExtractor,
222
         },
225
         },
223
       ];
226
       ];

Loading…
Cancel
Save