kupos-ui-components-lib 9.2.7 → 9.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,10 +14,18 @@ const getAmenitySplit = ({ isPeru, amenities, priorityIds }) => {
14
14
  /* ============================
15
15
  🇵🇪 PERU LOGIC
16
16
  ============================ */
17
+ // if (isPeru) {
18
+ // return hasPriority
19
+ // ? { visible: priority, plus: nonPriority }
20
+ // : { visible: [], plus: amenities };
21
+ // }
17
22
  if (isPeru) {
18
23
  return hasPriority
19
- ? { visible: priority, plus: nonPriority }
20
- : { visible: [], plus: amenities };
24
+ ? {
25
+ visible: priority.slice(0, 2),
26
+ plus: [...priority.slice(2), ...nonPriority],
27
+ }
28
+ : { visible: amenities.slice(0, 2), plus: amenities.slice(2) };
21
29
  }
22
30
  /* ============================
23
31
  🌍 NON-PERU LOGIC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kupos-ui-components-lib",
3
- "version": "9.2.7",
3
+ "version": "9.2.8",
4
4
  "description": "A reusable UI components package",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -28,10 +28,19 @@ const getAmenitySplit = ({ isPeru, amenities, priorityIds }) => {
28
28
  /* ============================
29
29
  🇵🇪 PERU LOGIC
30
30
  ============================ */
31
+ // if (isPeru) {
32
+ // return hasPriority
33
+ // ? { visible: priority, plus: nonPriority }
34
+ // : { visible: [], plus: amenities };
35
+ // }
36
+
31
37
  if (isPeru) {
32
38
  return hasPriority
33
- ? { visible: priority, plus: nonPriority }
34
- : { visible: [], plus: amenities };
39
+ ? {
40
+ visible: priority.slice(0, 2),
41
+ plus: [...priority.slice(2), ...nonPriority],
42
+ }
43
+ : { visible: amenities.slice(0, 2), plus: amenities.slice(2) };
35
44
  }
36
45
 
37
46
  /* ============================