@@ -84,27 +84,27 @@ function MenuDrawer({ userData, isOpen, onClose, links, hasChatbotAccess, isUser
8484
8585 return (
8686 < Drawer isOpen = { isOpen } placement = "left" onClose = { onClose } >
87- < DrawerOverlay backdropFilter = "blur(2px)" />
87+ < DrawerOverlay backdropFilter = "blur(2px)" />
8888 < DrawerContent padding = "24px" >
89- { locale === 'en' ? (
89+ { locale === "en" ? (
9090 < DBLogoImage
9191 widthImage = "65px"
9292 heightImage = "30px"
9393 marginBottom = "24px"
94- onClick = { ( ) => router . push ( '/' ) }
94+ onClick = { ( ) => router . push ( "/" ) }
9595 />
9696 ) : (
9797 < BDLogoImage
9898 widthImage = "65px"
9999 heightImage = "30px"
100100 marginBottom = "24px"
101- onClick = { ( ) => router . push ( '/' ) }
101+ onClick = { ( ) => router . push ( "/" ) }
102102 />
103103 ) }
104104 < VStack alignItems = "flex-start" width = "100%" spacing = "16px" >
105105 { Object . entries ( links ) . map ( ( [ key , elm ] ) => {
106- if ( key === "Button" ) {
107- return elm . map ( b =>
106+ if ( key === "Button" ) {
107+ return elm . map ( ( b ) => (
108108 < Button
109109 key = { b . name }
110110 backgroundColor = { b . color }
@@ -116,15 +116,15 @@ function MenuDrawer({ userData, isOpen, onClose, links, hasChatbotAccess, isUser
116116 >
117117 { b . name }
118118 </ Button >
119- )
119+ ) ) ;
120120 }
121121 if ( typeof elm === "object" ) {
122122 return (
123123 < Accordion key = { key } allowToggle width = "100%" >
124124 < AccordionItem borderWidth = "0 !important" >
125125 < AccordionButton
126126 padding = { 0 }
127- _hover = { { background : "none" } }
127+ _hover = { { background : "none" } }
128128 justifyContent = "space-between"
129129 >
130130 < Text
@@ -138,33 +138,35 @@ function MenuDrawer({ userData, isOpen, onClose, links, hasChatbotAccess, isUser
138138 </ Text >
139139 < AccordionIcon />
140140 </ AccordionButton >
141- < AccordionPanel
142- display = "flex"
143- flexDirection = "column"
144- gridGap = "13px"
145- padding = "16px 0 2px"
146- >
147- { elm . map ( ( c ) => {
148- if ( c . name === undefined ) return null
149-
150- return (
151- < Link
152- key = { c . name }
153- display = "flex"
154- gap = "16px"
155- fontSize = "16px"
156- fontFamily = "Roboto"
157- letterSpacing = "0.1px"
158- fontWeight = "400"
159- href = { c . href }
160- onClick = { ( ) => handleMenuLinkClick ( c . href ) }
161- > { c . icon && c . icon } { c . name } </ Link >
162- )
163- } ) }
164- </ AccordionPanel >
141+ < AccordionPanel
142+ display = "flex"
143+ flexDirection = "column"
144+ gridGap = "13px"
145+ padding = "16px 0 2px"
146+ >
147+ { elm . map ( ( c ) => {
148+ if ( c . name === undefined ) return null ;
149+
150+ return (
151+ < Link
152+ key = { c . name }
153+ display = "flex"
154+ gap = "16px"
155+ fontSize = "16px"
156+ fontFamily = "Roboto"
157+ letterSpacing = "0.1px"
158+ fontWeight = "400"
159+ href = { c . href }
160+ onClick = { ( ) => handleMenuLinkClick ( c . href ) }
161+ >
162+ { c . icon && c . icon } { c . name }
163+ </ Link >
164+ ) ;
165+ } ) }
166+ </ AccordionPanel >
165167 </ AccordionItem >
166168 </ Accordion >
167- )
169+ ) ;
168170 } else {
169171 return (
170172 < Link
@@ -175,9 +177,10 @@ function MenuDrawer({ userData, isOpen, onClose, links, hasChatbotAccess, isUser
175177 fontWeight = "400"
176178 href = { elm }
177179 onClick = { ( ) => handleMenuLinkClick ( elm ) }
178- > { key }
180+ >
181+ { key }
179182 </ Link >
180- )
183+ ) ;
181184 }
182185 } ) }
183186 </ VStack >
@@ -200,16 +203,12 @@ function MenuDrawer({ userData, isOpen, onClose, links, hasChatbotAccess, isUser
200203 fontSize = "20px"
201204 fontFamily = "Roboto"
202205 fontWeight = "400"
203- href = { hasChatbotAccess ? getChatbotStreamlitAppUrl ( ) : "/prices" }
206+ href = { hasChatbotAccess ? "/chatbot" : "/prices" }
204207 onClick = { ( e ) => {
205208 onClose ( ) ;
206209 if ( hasChatbotAccess ) {
207210 e . preventDefault ( ) ;
208- window . open (
209- getChatbotStreamlitAppUrl ( ) ,
210- "_blank" ,
211- "noopener,noreferrer"
212- ) ;
211+ router . push ( "/chatbot" ) ;
213212 trackMenuOpenChatbot ( {
214213 menuPlacement : "mobile_drawer" ,
215214 hasChatbotSubscription : hasChatbotAccess ,
@@ -242,24 +241,29 @@ function MenuDrawer({ userData, isOpen, onClose, links, hasChatbotAccess, isUser
242241 { userData ? (
243242 < > </ >
244243 ) : (
245- < Stack spacing = { 0 } display = { { base : "flex" , lg : "none" } } marginTop = "auto" gap = "16px" >
244+ < Stack
245+ spacing = { 0 }
246+ display = { { base : "flex" , lg : "none" } }
247+ marginTop = "auto"
248+ gap = "16px"
249+ >
246250 < Link
247251 href = "/user/login"
248252 width = "100%"
249253 onClick = { ( ) => {
250- if ( typeof window !== ' undefined' ) {
251- localStorage . setItem ( ' previousPath' , window . location . href )
254+ if ( typeof window !== " undefined" ) {
255+ localStorage . setItem ( " previousPath" , window . location . href ) ;
252256 }
253257 } }
254258 >
255259 < Button width = "100%" justifyContent = "center" >
256- { t ( ' enter' , { ns : ' menu' } ) }
260+ { t ( " enter" , { ns : " menu" } ) }
257261 </ Button >
258262 </ Link >
259263
260264 < Link href = "/user/register" width = "100%" >
261- < Button isVariant width = "100%" justifyContent = "center" >
262- { t ( ' register' , { ns : ' menu' } ) }
265+ < Button isVariant width = "100%" justifyContent = "center" >
266+ { t ( " register" , { ns : " menu" } ) }
263267 </ Button >
264268 </ Link >
265269 </ Stack >
@@ -389,16 +393,12 @@ function MenuDrawerUser({ userData, isOpen, onClose, isUserPro, haveInterprisePl
389393 gap = "6px"
390394 color = "#71757A"
391395 fontWeight = "400"
392- href = { hasChatbotAccess ? getChatbotStreamlitAppUrl ( ) : "/prices" }
396+ href = { hasChatbotAccess ? "/chatbot" : "/prices" }
393397 onClick = { ( e ) => {
394398 onClose ( )
395399 if ( hasChatbotAccess ) {
396400 e . preventDefault ( )
397- window . open (
398- getChatbotStreamlitAppUrl ( ) ,
399- "_blank" ,
400- "noopener,noreferrer"
401- )
401+ router . push ( "/chatbot" )
402402 trackMenuOpenChatbot ( {
403403 menuPlacement : "mobile_drawer_user" ,
404404 hasChatbotSubscription : hasChatbotAccess ,
@@ -981,9 +981,8 @@ function DesktopLinks({
981981 { ...( hasChatbotAccess
982982 ? {
983983 as : "a" ,
984- href : getChatbotStreamlitAppUrl ( ) ,
984+ href : "/chatbot" ,
985985 target : "_blank" ,
986- rel : "noopener noreferrer" ,
987986 onClick : ( ) =>
988987 trackMenuOpenChatbot ( {
989988 menuPlacement : "desktop_header_right" ,
0 commit comments