fix: Support passing the default app mode when creating an app (#25142)

Co-authored-by: 王博 <wangbo@localhost.com>
This commit is contained in:
Kurumi1997 2025-09-12 10:06:07 +08:00 • committed by GitHub
commit 8ffb9b6aed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 7 deletions

View file

@ -26,12 +26,14 @@ export type CreateAppCardProps = {
className?: string
onSuccess?: () => void
ref: React.RefObject<HTMLDivElement | null>
selectedAppType?: string
}
const CreateAppCard = ({
ref,
className,
onSuccess,
selectedAppType,
}: CreateAppCardProps) => {
const { t } = useTranslation()
const { onPlanInfoChanged } = useProviderContext()
@ -86,6 +88,7 @@ const CreateAppCard = ({
setShowNewAppTemplateDialog(true)
setShowNewAppModal(false)
}}
defaultAppMode={selectedAppType !== 'all' ? selectedAppType as any : undefined}
/>
)}
{showNewAppTemplateDialog && (