@luxfi/ui 5.3.21 → 5.3.23
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
|
}
|
|
@@ -27,7 +27,7 @@ const DesktopHeader: React.FC<{
|
|
|
27
27
|
// TODO move 13px into a size class and configure twMerge to recognize say, 'text-size-nav'
|
|
28
28
|
// (vs be beat out by 'text-color-nav')
|
|
29
29
|
return (
|
|
30
|
-
<header className={cn(
|
|
30
|
+
<header id='DESKTOP_HEADER' className={cn(
|
|
31
31
|
'bg-[rgba(0, 0, 0, 0.5)] !backdrop-blur-3xl fixed z-header top-0 left-0 right-0',
|
|
32
32
|
className,
|
|
33
33
|
isMenuOpened ? ' h-full' : ''
|
|
@@ -54,3 +54,4 @@ const DesktopHeader: React.FC<{
|
|
|
54
54
|
|
|
55
55
|
export default DesktopHeader
|
|
56
56
|
|
|
57
|
+
|
|
@@ -87,7 +87,7 @@ const MobileHeader: React.FC<{
|
|
|
87
87
|
}
|
|
88
88
|
// header element MUST be fixed, and NOT sticky. Or else drawer breaks on mobile browsers
|
|
89
89
|
return (<>
|
|
90
|
-
<header className={cn(
|
|
90
|
+
<header id='MOBILE_HEADER' className={cn(
|
|
91
91
|
`bg-background fixed z-header top-0 left-0 w-full ${menuOpen() ? 'hidden' : 'block'}`,
|
|
92
92
|
className
|
|
93
93
|
)}>
|
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!} >
|