mirror of
https://github.com/langgenius/dify.git
synced 2026-08-30 17:11:50 +08:00
fix(web): pass only datasetId across RSC boundary in dataset detail
layout
This commit is contained in:
@@ -28,13 +28,13 @@ import { cn } from '@/utils/classnames'
|
||||
|
||||
export type IAppDetailLayoutProps = {
|
||||
children: React.ReactNode
|
||||
params: { datasetId: string }
|
||||
datasetId: string
|
||||
}
|
||||
|
||||
const DatasetDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
|
||||
const {
|
||||
children,
|
||||
params: { datasetId },
|
||||
datasetId,
|
||||
} = props
|
||||
const { t } = useTranslation()
|
||||
const pathname = usePathname()
|
||||
|
||||
@@ -6,12 +6,11 @@ const DatasetDetailLayout = async (
|
||||
params: Promise<{ datasetId: string }>
|
||||
},
|
||||
) => {
|
||||
const params = await props.params
|
||||
|
||||
const {
|
||||
children,
|
||||
params,
|
||||
} = props
|
||||
|
||||
return <Main params={(await params)}>{children}</Main>
|
||||
return <Main datasetId={(await params).datasetId}>{children}</Main>
|
||||
}
|
||||
export default DatasetDetailLayout
|
||||
|
||||
Reference in New Issue
Block a user