l-min-components 1.7.1309 → 1.7.1310
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
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import { useLocation, useNavigate } from "react-router-dom";
|
|
11
11
|
// import useHeader from "./getHeaderDetails";
|
|
12
12
|
import { OutletContext } from "..";
|
|
13
|
+
import deleteCookies from "../instructorAccountSwitcher/deleteCookies";
|
|
13
14
|
/**
|
|
14
15
|
* @param {{
|
|
15
16
|
* type: string,
|
|
@@ -131,7 +132,8 @@ const AccountDropdown = (props) => {
|
|
|
131
132
|
handleRedirectFunc(developerItem);
|
|
132
133
|
}, 1000);
|
|
133
134
|
}}
|
|
134
|
-
key={idx}
|
|
135
|
+
key={idx}
|
|
136
|
+
>
|
|
135
137
|
<div className="avatar-container">
|
|
136
138
|
<img
|
|
137
139
|
src={
|
|
@@ -173,12 +175,17 @@ const AccountDropdown = (props) => {
|
|
|
173
175
|
: ""
|
|
174
176
|
}`}
|
|
175
177
|
onClick={() => {
|
|
178
|
+
deleteCookies([
|
|
179
|
+
"defaultAccountType",
|
|
180
|
+
"defaultAccountID",
|
|
181
|
+
]);
|
|
176
182
|
props?.setSelectedAccount(instructorItem);
|
|
177
183
|
setTimeout(() => {
|
|
178
184
|
handleRedirectFunc(instructorItem);
|
|
179
185
|
}, 1000);
|
|
180
186
|
}}
|
|
181
|
-
key={idx}
|
|
187
|
+
key={idx}
|
|
188
|
+
>
|
|
182
189
|
<div className="avatar-container">
|
|
183
190
|
<img
|
|
184
191
|
src={
|
|
@@ -215,12 +222,17 @@ const AccountDropdown = (props) => {
|
|
|
215
222
|
: ""
|
|
216
223
|
}`}
|
|
217
224
|
onClick={() => {
|
|
225
|
+
deleteCookies([
|
|
226
|
+
"defaultAccountType",
|
|
227
|
+
"defaultAccountID",
|
|
228
|
+
]);
|
|
218
229
|
props?.setSelectedAccount(enterpriseItem);
|
|
219
230
|
setTimeout(() => {
|
|
220
231
|
handleRedirectFunc(enterpriseItem);
|
|
221
232
|
}, 1000);
|
|
222
233
|
}}
|
|
223
|
-
key={idx}
|
|
234
|
+
key={idx}
|
|
235
|
+
>
|
|
224
236
|
<div className="avatar-container">
|
|
225
237
|
<img
|
|
226
238
|
src={
|
|
@@ -259,12 +271,17 @@ const AccountDropdown = (props) => {
|
|
|
259
271
|
: ""
|
|
260
272
|
}`}
|
|
261
273
|
onClick={() => {
|
|
274
|
+
deleteCookies([
|
|
275
|
+
"defaultAccountType",
|
|
276
|
+
"defaultAccountID",
|
|
277
|
+
]);
|
|
262
278
|
props?.setSelectedAccount(personalItem);
|
|
263
279
|
setTimeout(() => {
|
|
264
280
|
handleRedirectFunc(personalItem);
|
|
265
281
|
}, 1000);
|
|
266
282
|
}}
|
|
267
|
-
key={idx}
|
|
283
|
+
key={idx}
|
|
284
|
+
>
|
|
268
285
|
<div className="avatar-container">
|
|
269
286
|
<img
|
|
270
287
|
src={
|
|
@@ -299,7 +316,8 @@ const AccountDropdown = (props) => {
|
|
|
299
316
|
onClick={() => {
|
|
300
317
|
window.location.href = "/auth/account-type";
|
|
301
318
|
}}
|
|
302
|
-
style={{ cursor: "pointer" }}
|
|
319
|
+
style={{ cursor: "pointer" }}
|
|
320
|
+
>
|
|
303
321
|
<AddIcon /> {props.findText("Add account")}
|
|
304
322
|
</button>
|
|
305
323
|
</AccountDropdownFooter>
|
|
@@ -127,6 +127,7 @@ const useHeader = (props = { default: false }) => {
|
|
|
127
127
|
);
|
|
128
128
|
|
|
129
129
|
const handleSetDefaultAccount = async (accountID) => {
|
|
130
|
+
console.log("called to set default account", accountID);
|
|
130
131
|
try {
|
|
131
132
|
await postDefaultAccount({
|
|
132
133
|
url: "/iam/v1/users/default_account/",
|