From 93be1219ebc597eed7fa44d9f9d79a3bb34f93a5 Mon Sep 17 00:00:00 2001 From: Joel Date: Sat, 11 Oct 2025 11:00:26 +0800 Subject: [PATCH] chore: try app title --- web/app/components/try/app/index.tsx | 4 ++++ web/app/components/try/app/text-generation.tsx | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/app/components/try/app/index.tsx b/web/app/components/try/app/index.tsx index 5509acc86d..26c24fcaba 100644 --- a/web/app/components/try/app/index.tsx +++ b/web/app/components/try/app/index.tsx @@ -6,6 +6,7 @@ import TextGeneration from './text-generation' import Loading from '../../base/loading' import { useGetTryAppInfo } from '@/service/use-try-app' import type { AppData } from '@/models/share' +import useDocumentTitle from '@/hooks/use-document-title' type Props = { appId: string @@ -18,6 +19,9 @@ const TryApp: FC = ({ const mode = appInfo?.mode const isChat = ['chat', 'advanced-chat', 'agent-chat'].includes(mode!) const isCompletion = !isChat + + useDocumentTitle(appInfo?.site?.title || '') + if (isFetchingAppInfo) { return (
diff --git a/web/app/components/try/app/text-generation.tsx b/web/app/components/try/app/text-generation.tsx index fe246c75f5..889606d700 100644 --- a/web/app/components/try/app/text-generation.tsx +++ b/web/app/components/try/app/text-generation.tsx @@ -20,7 +20,6 @@ import type { Task } from '../../share/text-generation/types' import Res from '@/app/components/share/text-generation/result' import { AppSourceType } from '@/service/share' import { TaskStatus } from '@/app/components/share/text-generation/types' -import useDocumentTitle from '@/hooks/use-document-title' type Props = { appId: string @@ -37,7 +36,6 @@ const TextGeneration: FC = ({ }) => { const media = useBreakpoints() const isPC = media === MediaType.pc - useDocumentTitle(appData?.site?.title || '') const [inputs, doSetInputs] = useState>({}) const inputsRef = useRef>(inputs)