Skip to content

Commit 95dec47

Browse files
committed
Update AIChat.tsx
1 parent 10dd26a commit 95dec47

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/gitbook/src/components/AIChat/AIChat.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,8 @@ import { AIChatInput } from './AIChatInput';
3333
import { AIChatMessages } from './AIChatMessages';
3434
import AIChatSuggestedQuestions from './AIChatSuggestedQuestions';
3535

36-
export function AIChat(props: { trademark: boolean }) {
37-
const { trademark } = props;
38-
39-
const {
40-
config: { suggestions },
41-
} = useAI();
36+
export function AIChat() {
37+
const { config } = useAI();
4238
const language = useLanguage();
4339
const chat = useAIChatState();
4440
const chatController = useAIChatController();
@@ -85,10 +81,10 @@ export function AIChat(props: { trademark: boolean }) {
8581
<EmbeddableFrame className="relative shrink-0 border-tint-subtle border-l to-tint-base transition-all duration-300 max-lg:circular-corners:rounded-3xl max-lg:rounded-corners:rounded-md max-lg:border lg:w-80 xl:w-96">
8682
<EmbeddableFrameMain>
8783
<EmbeddableFrameHeader>
88-
<AIChatDynamicIcon trademark={trademark} />
84+
<AIChatDynamicIcon trademark={config.trademark} />
8985
<EmbeddableFrameHeaderMain>
9086
<EmbeddableFrameTitle>
91-
{getAIChatName(language, trademark)}
87+
{getAIChatName(language, config.trademark)}
9288
</EmbeddableFrameTitle>
9389
<AIChatSubtitle chat={chat} />
9490
</EmbeddableFrameHeaderMain>
@@ -108,7 +104,7 @@ export function AIChat(props: { trademark: boolean }) {
108104
<AIChatBody
109105
chatController={chatController}
110106
chat={chat}
111-
suggestions={suggestions}
107+
suggestions={config.suggestions}
112108
/>
113109
</EmbeddableFrameBody>
114110
</EmbeddableFrameMain>

0 commit comments

Comments
 (0)