chore: try app title

This commit is contained in:
Joel 2025-10-11 11:00:26 +08:00
parent 3276d6429d
commit 93be1219eb
2 changed files with 4 additions and 2 deletions

View File

@ -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<Props> = ({
const mode = appInfo?.mode
const isChat = ['chat', 'advanced-chat', 'agent-chat'].includes(mode!)
const isCompletion = !isChat
useDocumentTitle(appInfo?.site?.title || '')
if (isFetchingAppInfo) {
return (
<div className='flex h-full items-center justify-center'>

View File

@ -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<Props> = ({
}) => {
const media = useBreakpoints()
const isPC = media === MediaType.pc
useDocumentTitle(appData?.site?.title || '')
const [inputs, doSetInputs] = useState<Record<string, any>>({})
const inputsRef = useRef<Record<string, any>>(inputs)