@everymatrix/casino-header-controller 1.8.1 → 1.8.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-header-controller",
3
- "version": "1.8.1",
3
+ "version": "1.8.4",
4
4
  "main": "dist/casino-header-controller.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "e558ed5234cd858fa71696743229caa273752a2e"
41
+ "gitHead": "58b0374c9527cbfb3a070ac6fb1744bc670aba27"
42
42
  }
@@ -187,16 +187,16 @@
187
187
  //headerURL.searchParams.append('platform', 'dk');
188
188
  headerURL.searchParams.append('userRoles', userroles);
189
189
 
190
- if(device){
191
- if(device === 'PC'){
192
- hamburgerURL.searchParams.append('device', 'dk')
193
- headerURL.searchParams.append('device', 'dk')
194
- } else if(device === 'iPad' || device === 'iPhone') {
195
- hamburgerURL.searchParams.append('device', 'ios')
196
- headerURL.searchParams.append('device', 'ios')
190
+ if (device) {
191
+ if (device === 'PC'){
192
+ hamburgerURL.searchParams.append('device', 'dk');
193
+ headerURL.searchParams.append('device', 'dk');
194
+ } else if (device === 'iPad' || device === 'iPhone') {
195
+ hamburgerURL.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
196
+ headerURL.searchParams.append('device', 'mtWeb'); // replace with ios when we will have a native ios up for this
197
197
  } else {
198
- hamburgerURL.searchParams.append('device', 'mtWeb')
199
- headerURL.searchParams.append('device', 'mtWeb')
198
+ hamburgerURL.searchParams.append('device', 'mtWeb');
199
+ headerURL.searchParams.append('device', 'mtWeb');
200
200
  }
201
201
  }
202
202
  hamburgerURL.searchParams.append('env', cmsenv);
@@ -225,7 +225,8 @@
225
225
  }
226
226
 
227
227
  const setActiveIndex = ():void => {
228
- activeIndex = mainMenuArray.findIndex(item => item.path.indexOf(activecategory) > -1).toString();
228
+ activeIndex = mainMenuArray.find(item => item.path.indexOf(activecategory.split('/')[1]) > -1)?.id;
229
+
229
230
  }
230
231
 
231
232
  const sendSliderData = ():void => {