@luxfi/core 4.4.11 → 4.4.12
Sign up to get free protection for your applications and to get access to all the features.
@@ -39,7 +39,22 @@ const LoginPanel: React.FC<{
|
|
39
39
|
|
40
40
|
const onLogin = (token: string) => {
|
41
41
|
setAuthToken(token)
|
42
|
-
|
42
|
+
|
43
|
+
const promises = domains.map(({url}) => {
|
44
|
+
return new Promise<void>((resolve, reject) => {
|
45
|
+
const img = new Image()
|
46
|
+
img.onload = () => {
|
47
|
+
document.body.appendChild(img)
|
48
|
+
resolve()
|
49
|
+
}
|
50
|
+
img.onerror = reject
|
51
|
+
img.src = url
|
52
|
+
})
|
53
|
+
})
|
54
|
+
|
55
|
+
Promise.all(promises)
|
56
|
+
.then(() => redirectUrl && router.replace(redirectUrl))
|
57
|
+
.catch(error => console.error('An image failed to load', error));
|
43
58
|
}
|
44
59
|
|
45
60
|
return (<>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@luxfi/core",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.12",
|
4
4
|
"description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
|
5
5
|
"publishConfig": {
|
6
6
|
"registry": "https://registry.npmjs.org/",
|