l-min-components 1.0.1048 → 1.0.1050
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
|
@@ -294,15 +294,17 @@ const AppMainLayout = () => {
|
|
|
294
294
|
}
|
|
295
295
|
</LeftLayout>
|
|
296
296
|
<CenterLayout isOpen={isOpen} style={centerLayoutStyle}>
|
|
297
|
-
{
|
|
297
|
+
{
|
|
298
|
+
// window.location.pathname.includes("instructor") &&
|
|
298
299
|
!window.location.pathname.includes("enterprise") &&
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
300
|
+
!window.location.pathname.includes("manage-teams") && (
|
|
301
|
+
<InstructorAccountSwitcher
|
|
302
|
+
setAccountType={setAffiliatesActive}
|
|
303
|
+
generalData={generalData}
|
|
304
|
+
onChange={(v) => setAffiliateAccount(v)}
|
|
305
|
+
/>
|
|
306
|
+
)
|
|
307
|
+
}
|
|
306
308
|
|
|
307
309
|
{window.location.pathname.includes("enterprise") &&
|
|
308
310
|
planState === "GRACE PERIOD" ? (
|
|
@@ -32,10 +32,12 @@ const InstructorAccountSwitcher = ({ generalData, onChange }) => {
|
|
|
32
32
|
}, [generalData?.selectedAccount, search]);
|
|
33
33
|
|
|
34
34
|
const dropdownList = getAllAffiliateData?.data?.results?.map((item) => {
|
|
35
|
-
const image = item?.profile_photo?.url;
|
|
35
|
+
const image = item?.profile_photo?.url || item?.profile_photo[1][1];
|
|
36
36
|
return { name: item?.display_name, image, id: item?.id };
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
+
console.log(dropdownList, getAllAffiliateData);
|
|
40
|
+
|
|
39
41
|
const [dropdown, setDropdown] = useState(false);
|
|
40
42
|
|
|
41
43
|
const getCookie = () => {
|
|
@@ -72,16 +74,24 @@ const InstructorAccountSwitcher = ({ generalData, onChange }) => {
|
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
const handleSwitch = (value) => {
|
|
75
|
-
if (
|
|
76
|
-
if (
|
|
77
|
-
|
|
77
|
+
if (selectedValue) {
|
|
78
|
+
if (value === 2) {
|
|
79
|
+
if (selectedValue) {
|
|
80
|
+
setCookie(selectedValue?.id);
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
if (cookieValue) {
|
|
84
|
+
deleteCookies("affiliateAccount");
|
|
85
|
+
}
|
|
78
86
|
}
|
|
87
|
+
window.location.href = "/instructor/dashboard";
|
|
79
88
|
} else {
|
|
80
|
-
if (
|
|
81
|
-
|
|
89
|
+
if (value === 2) {
|
|
90
|
+
setSwitchValue("affiliates");
|
|
91
|
+
} else {
|
|
92
|
+
setSwitchValue(null);
|
|
82
93
|
}
|
|
83
94
|
}
|
|
84
|
-
window.location.href = "/instructor/dashboard";
|
|
85
95
|
};
|
|
86
96
|
|
|
87
97
|
useEffect(() => {
|
|
@@ -241,7 +251,7 @@ const Container = styled.div`
|
|
|
241
251
|
background: #ffffff;
|
|
242
252
|
border-radius: 25px;
|
|
243
253
|
height: 60px;
|
|
244
|
-
margin-bottom:
|
|
254
|
+
margin-bottom: 16px;
|
|
245
255
|
|
|
246
256
|
.left {
|
|
247
257
|
> p {
|