diff --git a/catalog/app/containers/Bucket/Qurator/Section.tsx b/catalog/app/containers/Bucket/Qurator/Section.tsx index 785aa5263b0..a818e983b89 100644 --- a/catalog/app/containers/Bucket/Qurator/Section.tsx +++ b/catalog/app/containers/Bucket/Qurator/Section.tsx @@ -3,7 +3,7 @@ import * as React from 'react' import { ChatSkeleton } from 'components/Chat' import * as Model from 'model' -import PageSection from '../Section' +import PageSection, { NodeRenderer } from '../Section' const QuratorSummary = React.lazy(() => import('./Summary')) @@ -12,15 +12,6 @@ interface QuratorSectionProps { } export default function QuratorSection({ handle }: QuratorSectionProps) { - const children = React.useCallback( - ({ expanded }) => - expanded && ( - }> - - - ), - [handle], - ) return ( - {children} + {({ expanded }: Parameters[0]) => + expanded && ( + }> + + + ) + } ) } diff --git a/catalog/app/containers/Bucket/Section.tsx b/catalog/app/containers/Bucket/Section.tsx index 1a737800df4..69cd5c74d94 100644 --- a/catalog/app/containers/Bucket/Section.tsx +++ b/catalog/app/containers/Bucket/Section.tsx @@ -28,7 +28,7 @@ const useStyles = M.makeStyles((t) => ({ }, })) -type NodeRenderer = (props: { +export type NodeRenderer = (props: { expanded: boolean setExpanded: (exp: boolean) => void }) => React.ReactNode