Browse Source

change sorting function name

Arnaud Vergnet 8 months 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,7 +65,10 @@ const styles = StyleSheet.create({
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 72
   const str1 = a.name.toLowerCase();
70 73
   const str2 = b.name.toLowerCase();
71 74
 
@@ -217,7 +220,7 @@ function ProximoMainScreen() {
217 220
       return [
218 221
         {
219 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 224
           keyExtractor: getKeyExtractor,
222 225
         },
223 226
       ];

Loading…
Cancel
Save