l-min-components 1.0.686 → 1.0.690

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.686",
3
+ "version": "1.0.690",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -185,7 +185,7 @@ const AppMainLayout = () => {
185
185
  : window.location.pathname.includes("developer") ||
186
186
  window.location.hostname.includes("developer")
187
187
  ? "developer"
188
- : defaultAcct
188
+ : defaultAcct?.toLowerCase()
189
189
  }
190
190
  isOpen={isOpen}
191
191
  setIsOpen={setIsOpen}
@@ -57,12 +57,11 @@ const HeaderComponent = (props) => {
57
57
  handleGetUnreadNotification,
58
58
  generalNotificationCountData,
59
59
  handleGeneralNotificationCount,
60
- notificationMarkReadData,
61
60
  notificationData,
62
61
  handleGetNotification
63
62
  } = useHeader();
64
63
  const { pathname } = useLocation();
65
- const { setGeneralData, generalData } = useContext(OutletContext);
64
+ const { setGeneralData, generalData, notificationMarkReadData } = useContext(OutletContext);
66
65
  const [selectedAccount, setSelectedAccount] = useState();
67
66
 
68
67
  useEffect(() => {
@@ -167,6 +166,14 @@ const HeaderComponent = (props) => {
167
166
  if (pathname?.includes("enterprise")) {
168
167
  setSelectedAccount(enterpriseArray[0]);
169
168
  }
169
+ // if all fails, set selected acct to developer
170
+ else{
171
+ setSelectedAccount(
172
+ developerArray?.find(
173
+ (item) => item?.id === activeDeveloperAccount ?? item
174
+ )
175
+ );
176
+ }
170
177
  }
171
178
  }, [userAccountsDetail?.data, generalNotificationCountData?.response]);
172
179
 
@@ -364,7 +371,7 @@ const HeaderComponent = (props) => {
364
371
  useEffect(() => {
365
372
  handleGetUnreadNotification();
366
373
  handleGeneralNotificationCount();
367
- }, [props?.notificationMarkReadData?.response]);
374
+ }, [notificationMarkReadData?.response]);
368
375
 
369
376
  return (
370
377
  <Navbar>