Skip to content

Commit

Permalink
ui: remove hard coded tidb.ai
Browse files Browse the repository at this point in the history
  • Loading branch information
634750802 committed Apr 16, 2024
1 parent 7e8ab60 commit 50b8a0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
4 changes: 3 additions & 1 deletion src/app/(main)/(admin)/settings/javascript/page.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ export default function ClientPage(props: any) {
function CustomJsCodeBlock(props: { data: ICustomJsSettingResult }) {
const { data } = props;

const origin = location.origin;

const strMemo = React.useMemo(() => {
const strHead = `<script\n async\n src='https://tidb.ai/rag-widget.js'\n data-id='tidb-ai-widget'\n data-name='tidb-ai-widget'`;
const strHead = `<script\n async\n src='${origin}/rag-widget.js'\n data-id='tidb-ai-widget'\n data-name='tidb-ai-widget'`;
const strTail = '\n/>';
const template = {
['data-api-base-url']: data.api_base_url,
Expand Down
17 changes: 0 additions & 17 deletions src/components/site-header.tsx

This file was deleted.

0 comments on commit 50b8a0e

Please sign in to comment.