l-min-components 1.7.1290 → 1.7.1292

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.7.1290",
3
+ "version": "1.7.1292",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/assets",
@@ -297,7 +297,7 @@ const AppMainLayout = ({ children }) => {
297
297
  setIsTranslationsLoading,
298
298
  } = useTranslation(wordBank);
299
299
 
300
- const messageKit = useMessageKit(/*affiliatesActive*/); // useMessageKit
300
+ const messageKit = useMessageKit({ affiliateAccount }); // useMessageKit
301
301
 
302
302
  return (
303
303
  <OutletContext.Provider
@@ -65,8 +65,7 @@ const AccountDropdown = (props) => {
65
65
  <div>
66
66
  <h1 style={{ textTransform: "capitalize" }}>
67
67
  {" "}
68
- {props?.selectedAccount?.metadata?.organization_name ||
69
- props?.activeAccountName}
68
+ {findAccountNames(props?.selectedAccount)}
70
69
  </h1>
71
70
  <h2 style={{ textTransform: "capitalize" }}>
72
71
  {props?.selectedAccount?.type?.toLowerCase() ||
@@ -121,6 +121,8 @@ const InstructorAccountSwitcher = ({ generalData, onChange }) => {
121
121
  const cookie = prioritizedAffiliateId ?? cookieValue;
122
122
  if (cookie) {
123
123
  setSwitchValue("affiliates");
124
+ // store cookie
125
+ setCookie(cookie);
124
126
  onChange({ id: cookie });
125
127
  } else {
126
128
  setSwitchValue(null);
@@ -236,7 +236,7 @@ import sound from "./new-notification-7-210334.mp3";
236
236
  * @property {any | null} media - The media data (e.g., File object, FormData details). Needs proper handling before API call.
237
237
  */
238
238
 
239
- const useMessageKit = (/*affiliatesActive*/) => {
239
+ const useMessageKit = ({ affiliateAccount: AffiliateAccount }) => {
240
240
  const cookieGrabber = (key = "") => {
241
241
  const cookies = document.cookie;
242
242
  const string = cookies.split(";").find((cookie) => {
@@ -1462,7 +1462,7 @@ const useMessageKit = (/*affiliatesActive*/) => {
1462
1462
  // accountId: "24dbaeede1",
1463
1463
  // });
1464
1464
  })();
1465
- }, []); // Rerun when selectedAccount changes
1465
+ }, [AffiliateAccount]); // Rerun when selectedAccount changes
1466
1466
  // console.log(
1467
1467
  // getMessagesForRoom("5be9b48281ac4c2885d3b719654ed59d", "878", "24dbaeede1"),
1468
1468
  // "hold versions"