@luxfi/ui 5.3.20 → 5.3.22
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.
|
@@ -4,8 +4,7 @@ import { useEffect } from 'react'
|
|
|
4
4
|
import { GoogleAnalytics } from '@next/third-parties/google'
|
|
5
5
|
import { FacebookPixel } from '../next/analytics'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
const Scripts = () => {
|
|
7
|
+
const Analytics = () => {
|
|
9
8
|
|
|
10
9
|
useEffect(() => {
|
|
11
10
|
document.body.style.display = 'flex'
|
|
@@ -20,5 +19,5 @@ const Scripts = () => {
|
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
Analytics as default
|
|
24
23
|
}
|
|
@@ -41,11 +41,11 @@ const DesktopHeader: React.FC<{
|
|
|
41
41
|
<Logo size='sm' href='/' outerClx='hidden md:flex lg:hidden' key='one' variant='text-only' />
|
|
42
42
|
{/* md or larger */}
|
|
43
43
|
<div className='flex w-full gap-4 items-center justify-center'>
|
|
44
|
-
|
|
44
|
+
<DesktopNav links={links} isMenuOpened={isMenuOpened} setIsMenuOpen={setIsMenuOpen} />
|
|
45
45
|
</div>
|
|
46
46
|
<div className='flex items-center'>
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
<DesktopBagPopup popupClx='w-[340px]' trigger={<BagButton className='text-primary -mr-[3px] lg:min-w-0' />} />
|
|
48
|
+
<AuthWidget noLogin={noAuth}/>
|
|
49
49
|
</div>
|
|
50
50
|
</div>
|
|
51
51
|
</header>
|
|
@@ -54,3 +54,5 @@ const DesktopHeader: React.FC<{
|
|
|
54
54
|
|
|
55
55
|
export default DesktopHeader
|
|
56
56
|
|
|
57
|
+
|
|
58
|
+
|
package/components/index.ts
CHANGED
|
@@ -19,7 +19,7 @@ export { default as CheckoutButton } from './commerce/checkout-button'
|
|
|
19
19
|
export { default as CheckoutPanel } from './commerce/checkout-panel'
|
|
20
20
|
export { default as LoginPanel } from './auth/login-panel'
|
|
21
21
|
export { default as SignupPanel } from './auth/signup-panel'
|
|
22
|
-
export { default as
|
|
22
|
+
export { default as Analytics } from './analytics'
|
|
23
23
|
export { default as Tooltip } from './tooltip'
|
|
24
24
|
|
|
25
25
|
export { default as EmblaAutoplay } from 'embla-carousel-autoplay'
|
|
@@ -5,8 +5,13 @@ import type NextFontDesc from './next-font-desc'
|
|
|
5
5
|
|
|
6
6
|
// First is assumed to be mapped to the default font and is injected into <body>
|
|
7
7
|
// as a normal tw font family class.
|
|
8
|
-
export default () =>
|
|
9
|
-
nextFonts.map(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
)
|
|
8
|
+
export default () => {
|
|
9
|
+
let nf = nextFonts.map((desc: NextFontDesc) => (desc.nextFont!.variable))
|
|
10
|
+
// dedupe
|
|
11
|
+
nf = nf.filter(
|
|
12
|
+
(str, i, arr) => (
|
|
13
|
+
arr.indexOf(str) === i
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
return nf.join(' ') + ` font-${nextFonts[0].twName}`
|
|
17
|
+
}
|
package/package.json
CHANGED
package/root-layout/index.tsx
CHANGED
|
@@ -11,7 +11,7 @@ import getAppRouterBodyFontClasses from '../next/font/get-app-router-font-classe
|
|
|
11
11
|
import { FacebookPixelHead } from '../next/analytics/pixel-analytics'
|
|
12
12
|
|
|
13
13
|
import { CommerceUIProvider } from '../commerce/ui/context'
|
|
14
|
-
import { AuthListener, ChatWidget, Header,
|
|
14
|
+
import { AuthListener, ChatWidget, Header, Analytics } from '../components'
|
|
15
15
|
|
|
16
16
|
import CommerceDrawer from '../components/commerce/drawer'
|
|
17
17
|
|
|
@@ -80,13 +80,12 @@ async function RootLayout({
|
|
|
80
80
|
<FacebookPixelHead/>
|
|
81
81
|
</head>
|
|
82
82
|
|
|
83
|
-
<body className={bodyClasses} style={{
|
|
84
|
-
|
|
85
|
-
// As also noted above, 'overflow: hidden' on the <body> tag breaks scroll snap!
|
|
86
|
-
display: 'none', // see scripts.tsx // :aa concerned about this.
|
|
83
|
+
<body suppressHydrationWarning className={bodyClasses} style={{
|
|
87
84
|
|
|
85
|
+
// As noted above: 'overflow: hidden' on the <body> tag breaks scroll snap!
|
|
86
|
+
display: 'none', // see analytics.tsx
|
|
88
87
|
}}>
|
|
89
|
-
<
|
|
88
|
+
<Analytics/>
|
|
90
89
|
<AuthServiceProvider user={currentUser} conf={{} as AuthServiceConf}>
|
|
91
90
|
{siteDef?.commerce ? (
|
|
92
91
|
<CommerceProvider config={siteDef.commerce!} >
|