@luxfi/core 4.5.2 → 4.5.3
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/root-layout/index.tsx +9 -9
package/package.json
CHANGED
package/root-layout/index.tsx
CHANGED
@@ -53,16 +53,16 @@ const RootLayout: React.FC<PropsWithChildren & {
|
|
53
53
|
}) => {
|
54
54
|
|
55
55
|
const currentUser = await getUserServerSide()
|
56
|
-
const usingCommerce = siteDef
|
56
|
+
const usingCommerce = siteDef?.ext?.commerce && siteDef.ext.commerce.rootNode && siteDef.ext.commerce.families
|
57
57
|
|
58
58
|
const Guts: React.FC = () => (<>
|
59
59
|
{showHeader && <Header siteDef={siteDef}/>}
|
60
60
|
{children}
|
61
|
-
{chatbot && (
|
62
|
-
<ChatWidget
|
63
|
-
title='LUX'
|
64
|
-
subtitle='AI'
|
65
|
-
chatbotUrl='https://lux.chat/iframe'
|
61
|
+
{chatbot && (
|
62
|
+
<ChatWidget
|
63
|
+
title='LUX'
|
64
|
+
subtitle='AI'
|
65
|
+
chatbotUrl='https://lux.chat/iframe'
|
66
66
|
suggestedQuestions={siteDef.ext?.chatBot?.suggestedQuestions ?? []}
|
67
67
|
/>
|
68
68
|
)}
|
@@ -88,15 +88,15 @@ const RootLayout: React.FC<PropsWithChildren & {
|
|
88
88
|
<Scripts/>
|
89
89
|
<AuthServiceProvider user={currentUser} conf={{} as AuthServiceConf}>
|
90
90
|
{usingCommerce ? (
|
91
|
-
<CommerceProvider
|
92
|
-
rootNode={siteDef.ext.commerce.rootNode}
|
91
|
+
<CommerceProvider
|
92
|
+
rootNode={siteDef.ext.commerce.rootNode}
|
93
93
|
families={siteDef.ext.commerce.families}
|
94
94
|
options={siteDef.ext.commerce.options}
|
95
95
|
uiSpecs={selectionUISpecifiers}
|
96
96
|
>
|
97
97
|
<Guts />
|
98
98
|
</CommerceProvider>
|
99
|
-
) : (
|
99
|
+
) : (
|
100
100
|
<Guts />
|
101
101
|
)}
|
102
102
|
<AuthListener/>
|