File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,23 @@ function AssistantModal({ isOpen, onClose }) {
77 // Get the current page URL.
88 const currentUrl = window . location . href ;
99
10+ // Check if the user is on the Japanese documentation page.
11+ const isJapanese = currentUrl . includes ( "/ja-jp" ) ;
12+
1013 return (
1114 < div className = "modal" style = { styles . modal } >
1215 < div className = "modal-content" style = { styles . modalContent } >
1316 { /* Close the button. */ }
1417 < span className = "close" onClick = { onClose } style = { styles . closeButton } >
1518 ×
1619 </ span >
20+
21+ { /* Conditionally render the Typebot based on language. */ }
1722 < Standard
18- typebot = "ja-jp-scalar-docs-ai-assistant-for-scalar-membership-program-members-201712"
23+ typebot = { isJapanese
24+ ? "ja-jp-scalar-docs-ai-assistant-for-scalar-membership-program-members-201712"
25+ : "en-us-scalar-docs-ai-assistant-for-scalar-membership-program-members-201712"
26+ }
1927 style = { { width : "100%" , height : "600px" } }
2028 prefilledVariables = { {
2129 "Current page URL" : `${ currentUrl } ` , // Pass page URL as a query parameter.
You can’t perform that action at this time.
0 commit comments