mirror of
https://github.com/langgenius/dify.git
synced 2026-08-28 20:26:50 +08:00
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 Loading from '../../base/loading'
|
||||||
import { useGetTryAppInfo } from '@/service/use-try-app'
|
import { useGetTryAppInfo } from '@/service/use-try-app'
|
||||||
import type { AppData } from '@/models/share'
|
import type { AppData } from '@/models/share'
|
||||||
|
import useDocumentTitle from '@/hooks/use-document-title'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
appId: string
|
appId: string
|
||||||
@ -18,6 +19,9 @@ const TryApp: FC<Props> = ({
|
|||||||
const mode = appInfo?.mode
|
const mode = appInfo?.mode
|
||||||
const isChat = ['chat', 'advanced-chat', 'agent-chat'].includes(mode!)
|
const isChat = ['chat', 'advanced-chat', 'agent-chat'].includes(mode!)
|
||||||
const isCompletion = !isChat
|
const isCompletion = !isChat
|
||||||
|
|
||||||
|
useDocumentTitle(appInfo?.site?.title || '')
|
||||||
|
|
||||||
if (isFetchingAppInfo) {
|
if (isFetchingAppInfo) {
|
||||||
return (
|
return (
|
||||||
<div className='flex h-full items-center justify-center'>
|
<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 Res from '@/app/components/share/text-generation/result'
|
||||||
import { AppSourceType } from '@/service/share'
|
import { AppSourceType } from '@/service/share'
|
||||||
import { TaskStatus } from '@/app/components/share/text-generation/types'
|
import { TaskStatus } from '@/app/components/share/text-generation/types'
|
||||||
import useDocumentTitle from '@/hooks/use-document-title'
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
appId: string
|
appId: string
|
||||||
@ -37,7 +36,6 @@ const TextGeneration: FC<Props> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const media = useBreakpoints()
|
const media = useBreakpoints()
|
||||||
const isPC = media === MediaType.pc
|
const isPC = media === MediaType.pc
|
||||||
useDocumentTitle(appData?.site?.title || '')
|
|
||||||
|
|
||||||
const [inputs, doSetInputs] = useState<Record<string, any>>({})
|
const [inputs, doSetInputs] = useState<Record<string, any>>({})
|
||||||
const inputsRef = useRef<Record<string, any>>(inputs)
|
const inputsRef = useRef<Record<string, any>>(inputs)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user