@yeeyoon/library 2.1.4 → 2.1.8
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.
@@ -99,7 +99,7 @@ const Header = (props) => {
|
|
99
99
|
return item.id === tId;
|
100
100
|
});
|
101
101
|
if (tenant.length) {
|
102
|
-
currentProduct = tenant[0].applications;
|
102
|
+
currentProduct = tenant[0].applications || [];
|
103
103
|
leftProduct = _xorBy(allProduct, currentProduct, 'id');
|
104
104
|
}
|
105
105
|
}, [tenantId]);
|
@@ -139,7 +139,7 @@ const Header = (props) => {
|
|
139
139
|
setAvatarProps(
|
140
140
|
data.headUrl ? { src: data.headUrl } : { icon: <UserOutlined /> }
|
141
141
|
);
|
142
|
-
currentProduct = tenants[0].applications;
|
142
|
+
currentProduct = tenants[0].applications || [];
|
143
143
|
getProductList(id);
|
144
144
|
} else {
|
145
145
|
setTimeout(() => {
|
@@ -200,7 +200,7 @@ const Header = (props) => {
|
|
200
200
|
className={styles['comp-header__logo']}
|
201
201
|
onClick={() => {
|
202
202
|
if (productName === 'profile') {
|
203
|
-
window.location.href = HOST_OFFICIAL
|
203
|
+
window.location.href = `${HOST_OFFICIAL}?token=${token}`;
|
204
204
|
} else {
|
205
205
|
window.location.reload();
|
206
206
|
}
|
@@ -16,11 +16,10 @@ const TenantSelector = (props) => {
|
|
16
16
|
const { data, success } = resp;
|
17
17
|
if (success) {
|
18
18
|
const { tenants } = data;
|
19
|
+
const id = tenantId || tenants[0].id;
|
19
20
|
setTenantList(tenants);
|
20
|
-
setCurrentTenantId(
|
21
|
-
|
22
|
-
tenantIdChangeCb(currentTenantId);
|
23
|
-
});
|
21
|
+
setCurrentTenantId(id);
|
22
|
+
tenantIdChangeCb(id);
|
24
23
|
}
|
25
24
|
}, []);
|
26
25
|
|