l-min-components 1.0.1031 → 1.0.1036
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
|
@@ -30,11 +30,13 @@ const InstructorAccountSwitcher = ({
|
|
|
30
30
|
} = useHeader();
|
|
31
31
|
|
|
32
32
|
useEffect(() => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
if (getAllAffiliateData?.data?.count) {
|
|
34
|
+
const account = generalData?.selectedAccount;
|
|
35
|
+
if (account?.type?.toLocaleLowerCase() === "instructor") {
|
|
36
|
+
handleGetAllAffiliate({ search });
|
|
37
|
+
}
|
|
36
38
|
}
|
|
37
|
-
}, [generalData?.selectedAccount, search]);
|
|
39
|
+
}, [generalData?.selectedAccount, search, getAllAffiliateData?.data]);
|
|
38
40
|
|
|
39
41
|
const dropdownList = data?.map((item) => {
|
|
40
42
|
const image = item?.profile_photo?.url;
|
|
@@ -100,18 +102,20 @@ const InstructorAccountSwitcher = ({
|
|
|
100
102
|
}, []);
|
|
101
103
|
|
|
102
104
|
useEffect(() => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
if (getAllAffiliateData?.data?.results?.length > 0) {
|
|
106
|
+
handleGetDefaultAffiliate().then((res) => {
|
|
107
|
+
if (res?.data) {
|
|
108
|
+
const value = res?.data;
|
|
109
|
+
const image = value?.profile_photo?.url;
|
|
110
|
+
setSelectedValue(() => ({
|
|
111
|
+
name: value?.display_name,
|
|
112
|
+
image,
|
|
113
|
+
id: value?.id,
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}, [getAllAffiliateData?.data]);
|
|
115
119
|
|
|
116
120
|
const handleSelection = async (item) => {
|
|
117
121
|
const res = await handleSetDefaultAffiliate({
|