l-min-components 1.7.1393 → 1.7.1394
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
|
@@ -120,6 +120,16 @@ const InstructorAccountSwitcher = ({
|
|
|
120
120
|
}
|
|
121
121
|
}, [prioritizedAffiliateId]);
|
|
122
122
|
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
if (
|
|
125
|
+
!defaultAffiliate?.metadata?.organization_name &&
|
|
126
|
+
affiliateList?.length > 0
|
|
127
|
+
) {
|
|
128
|
+
const account = affiliateList[0];
|
|
129
|
+
handleSelection(account);
|
|
130
|
+
}
|
|
131
|
+
}, [defaultAffiliate, affiliateList]);
|
|
132
|
+
|
|
123
133
|
return (
|
|
124
134
|
<>
|
|
125
135
|
{setDefaultAffiliateData?.loading && (
|
|
@@ -154,7 +164,7 @@ const InstructorAccountSwitcher = ({
|
|
|
154
164
|
{switchValue === "affiliates" && (
|
|
155
165
|
<OutsideAlerter handleClick={() => setDropdown(false)}>
|
|
156
166
|
<AffiliatesDropDown>
|
|
157
|
-
{!defaultAffiliate ? (
|
|
167
|
+
{!defaultAffiliate?.metadata?.organization_name ? (
|
|
158
168
|
<div
|
|
159
169
|
className="placeholder"
|
|
160
170
|
onClick={() => setDropdown(!dropdown)}
|