Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

refactor(web): mark Props of explore/try-app/preview components as read-only (#25219) (#37135)

Archie72c92fa60a33
diff --git a/web/app/components/explore/try-app/preview/basic-app-preview.tsx b/web/app/components/explore/try-app/preview/basic-app-preview.tsx
index cbc56377fdb..c118b8e51e5 100644
--- a/web/app/components/explore/try-app/preview/basic-app-preview.tsx
+++ b/web/app/components/explore/try-app/preview/basic-app-preview.tsx
@@ -29,7 +29,7 @@ import { basePath } from '@/utils/var'
import { useTextGenerationCurrentProviderAndModelAndModelList } from '../../../header/account-setting/model-provider-page/hooks'
type Props = {
- appId: string
+ readonly appId: string
}
const defaultModelConfig = {
diff --git a/web/app/components/explore/try-app/preview/flow-app-preview.tsx b/web/app/components/explore/try-app/preview/flow-app-preview.tsx
index 89a68a2ec14..fa7232e930d 100644
--- a/web/app/components/explore/try-app/preview/flow-app-preview.tsx
+++ b/web/app/components/explore/try-app/preview/flow-app-preview.tsx
@@ -7,8 +7,8 @@ import WorkflowPreview from '@/app/components/workflow/workflow-preview'
import { useGetTryAppFlowPreview } from '@/service/use-try-app'
type Props = {
- appId: string
- className?: string
+ readonly appId: string
+ readonly className?: string
}
const FlowAppPreview: FC<Props> = ({
diff --git a/web/app/components/explore/try-app/preview/index.tsx b/web/app/components/explore/try-app/preview/index.tsx
index 3acaf631172..91a6bc42e21 100644
--- a/web/app/components/explore/try-app/preview/index.tsx
+++ b/web/app/components/explore/try-app/preview/index.tsx
@@ -6,8 +6,8 @@ import BasicAppPreview from './basic-app-preview'
import FlowAppPreview from './flow-app-preview'
type Props = {
- appId: string
- appDetail: TryAppInfo
+ readonly appId: string
+ readonly appDetail: TryAppInfo
}
const Preview: FC<Props> = ({