File tree Expand file tree Collapse file tree
www/packages/docs-ui/src/providers/AiAssistant Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import React, {
1313import type { Source } from "@kapaai/react-sdk"
1414import useResizeObserver from "@react-hook/resize-observer"
1515import { AiAssistantSearchWindow } from "../../components"
16+ import { useIsBrowser } from "../BrowserProvider"
1617
1718export type AiAssistantChatType = "default" | "popover"
1819
@@ -66,6 +67,7 @@ const AiAssistantInnerProvider = ({
6667 ( ) => isGeneratingAnswer || isPreparingAnswer ,
6768 [ isGeneratingAnswer , isPreparingAnswer ]
6869 )
70+ const { isBrowser } = useIsBrowser ( )
6971
7072 const scrollToBottom = ( ) => {
7173 if ( preventAutoScroll ) {
@@ -133,6 +135,15 @@ const AiAssistantInnerProvider = ({
133135 } )
134136 } , [ scrollToBottom ] )
135137
138+ useEffect ( ( ) => {
139+ if ( ! isBrowser ) {
140+ return
141+ }
142+
143+ const recaptchaElm = document . querySelector ( ".grecaptcha-badge" )
144+ recaptchaElm ?. parentElement ?. classList . add ( "absolute" )
145+ } , [ isBrowser ] )
146+
136147 return (
137148 < AiAssistantContext . Provider
138149 value = { {
You can’t perform that action at this time.
0 commit comments