@luxfi/core 4.4.5 → 4.4.7
Sign up to get free protection for your applications and to get access to all the features.
@@ -19,9 +19,9 @@ const AuthListener = () => {
|
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
-
if (window) {
|
22
|
+
if (typeof window !== 'undefined') {
|
23
23
|
window.addEventListener('message', handleMessage)
|
24
|
-
|
24
|
+
|
25
25
|
return () => {
|
26
26
|
window.removeEventListener('message', handleMessage)
|
27
27
|
}
|
@@ -38,4 +38,4 @@ const AuthListener = () => {
|
|
38
38
|
)
|
39
39
|
}
|
40
40
|
|
41
|
-
export default AuthListener
|
41
|
+
export default AuthListener
|
@@ -29,7 +29,7 @@ const LoginPanel: React.FC<{
|
|
29
29
|
reviews
|
30
30
|
}) => {
|
31
31
|
const router = useRouter()
|
32
|
-
|
32
|
+
|
33
33
|
const termsOfServiceUrl = legal.find(({title}) => title === 'Terms and Conditions')?.href || ''
|
34
34
|
const privacyPolicyUrl = legal.find(({title}) => title === 'Privacy Policy')?.href || ''
|
35
35
|
|
@@ -45,13 +45,13 @@ const LoginPanel: React.FC<{
|
|
45
45
|
const handleMessage = (event: any) => {
|
46
46
|
if (domains.includes(event.origin)) {
|
47
47
|
const token = getCookie('auth-token')
|
48
|
-
parent
|
48
|
+
parent?.contentWindow?.postMessage(token, event.origin)
|
49
49
|
}
|
50
50
|
}
|
51
51
|
|
52
|
-
if (window) {
|
52
|
+
if (typeof window !== 'undefined') {
|
53
53
|
window.addEventListener('message', handleMessage)
|
54
|
-
|
54
|
+
|
55
55
|
return () => {
|
56
56
|
window.removeEventListener('message', handleMessage)
|
57
57
|
}
|
@@ -69,7 +69,7 @@ const LoginPanel: React.FC<{
|
|
69
69
|
className='w-fit !min-w-0 p-2'
|
70
70
|
>
|
71
71
|
<Logo size='md' spanClassName='!cursor-pointer' layout='text-only'/>
|
72
|
-
</Button>
|
72
|
+
</Button>
|
73
73
|
<Carousel
|
74
74
|
options={{ align: 'center', loop: true }}
|
75
75
|
className='w-full'
|
@@ -99,8 +99,8 @@ const LoginPanel: React.FC<{
|
|
99
99
|
>
|
100
100
|
<LuxLogo className='w-5 h-5'/>
|
101
101
|
</Button>
|
102
|
-
<Login
|
103
|
-
getStartedUrl={getStartedUrl}
|
102
|
+
<Login
|
103
|
+
getStartedUrl={getStartedUrl}
|
104
104
|
redirectUrl={redirectUrl}
|
105
105
|
className='w-full max-w-sm'
|
106
106
|
termsOfServiceUrl={termsOfServiceUrl}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@luxfi/core",
|
3
|
-
"version": "4.4.
|
3
|
+
"version": "4.4.7",
|
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/",
|
@@ -39,8 +39,8 @@
|
|
39
39
|
"./conf": "./conf/index.ts"
|
40
40
|
},
|
41
41
|
"dependencies": {
|
42
|
-
"@hanzo/auth": "2.4.
|
43
|
-
"@hanzo/commerce": "6.4.
|
42
|
+
"@hanzo/auth": "2.4.4",
|
43
|
+
"@hanzo/commerce": "6.4.4",
|
44
44
|
"@hanzo/ui": "3.6.3",
|
45
45
|
"@next/third-parties": "^14.1.0",
|
46
46
|
"cookies-next": "^4.1.1",
|