l-min-components 1.0.697 → 1.0.699

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": "l-min-components",
3
- "version": "1.0.697",
3
+ "version": "1.0.699",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -145,8 +145,10 @@ const HeaderComponent = (props) => {
145
145
  }
146
146
  });
147
147
 
148
- if (pathname?.includes("personal")) {
149
- setSelectedAccount(personalArray[0]);
148
+ if (window.location.pathname.includes("personal")) {
149
+ setSelectedAccount(personalArray?.find(
150
+ (item) => (item?.id === defaultAcctId || item?.id === account_id) ?? item
151
+ ));
150
152
  }
151
153
  if (
152
154
  window.location.host?.includes("developer") ||
@@ -160,11 +162,15 @@ const HeaderComponent = (props) => {
160
162
  )
161
163
  );
162
164
  }
163
- if (pathname?.includes("instructor")) {
164
- setSelectedAccount(instructorArray[0]);
165
+ if (window.location.pathname.includes("instructor")) {
166
+ setSelectedAccount(instructorArray?.find(
167
+ (item) => (item?.id === defaultAcctId || item?.id === account_id) ?? item
168
+ ));
165
169
  }
166
- if (pathname?.includes("enterprise")) {
167
- setSelectedAccount(enterpriseArray[0]);
170
+ if (window.location.pathname.includes("enterprise")) {
171
+ setSelectedAccount(enterpriseArray?.find(
172
+ (item) => (item?.id === defaultAcctId || item?.id === account_id) ?? item
173
+ ));
168
174
  }
169
175
  // if all fails, set selected acct to developer
170
176
  else{