dify/web/app/components/explore/try-app/preview/index.tsx
Joel b9f718005c
feat: frontend part of support try apps (#31287)
Co-authored-by: CodingOnStar <hanxujiang@dify.ai>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
2026-01-22 18:16:37 +08:00

26 lines
637 B
TypeScript

'use client'
import type { FC } from 'react'
import type { TryAppInfo } from '@/service/try-app'
import * as React from 'react'
import BasicAppPreview from './basic-app-preview'
import FlowAppPreview from './flow-app-preview'
type Props = {
appId: string
appDetail: TryAppInfo
}
const Preview: FC<Props> = ({
appId,
appDetail,
}) => {
const isBasicApp = ['agent-chat', 'chat', 'completion'].includes(appDetail.mode)
return (
<div className="h-full w-full">
{isBasicApp ? <BasicAppPreview appId={appId} /> : <FlowAppPreview appId={appId} className="h-full" />}
</div>
)
}
export default React.memo(Preview)