mirror of https://github.com/langgenius/dify.git
chore: try app title
This commit is contained in:
parent
3276d6429d
commit
93be1219eb
|
|
@ -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'>
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue