@luxfi/core 4.4.11 → 4.4.12

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.
@@ -39,7 +39,22 @@ const LoginPanel: React.FC<{
39
39
 
40
40
  const onLogin = (token: string) => {
41
41
  setAuthToken(token)
42
- redirectUrl && setTimeout(() => router.replace(redirectUrl))
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.11",
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/",