rename prop

This commit is contained in:
Nate Kelley 2025-08-21 22:11:07 -06:00
parent 55751b0468
commit 6818c46578
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 13 additions and 12 deletions

View File

@ -30,7 +30,7 @@ interface ReportEditorProps {
onReady?: (editor: IReportEditor) => void; onReady?: (editor: IReportEditor) => void;
id?: string; id?: string;
mode?: 'export' | 'default'; mode?: 'export' | 'default';
children?: React.ReactNode; preEditorChildren?: React.ReactNode;
postEditorChildren?: React.ReactNode; postEditorChildren?: React.ReactNode;
} }
@ -60,7 +60,7 @@ export const ReportEditor = React.memo(
useFixedToolbarKit = false, useFixedToolbarKit = false,
readOnly = false, readOnly = false,
isStreaming = false, isStreaming = false,
children, preEditorChildren,
postEditorChildren postEditorChildren
}, },
ref ref
@ -135,7 +135,7 @@ export const ReportEditor = React.memo(
variant={variant} variant={variant}
readOnly={readOnly} readOnly={readOnly}
className={cn('editor-container relative overflow-auto', containerClassName)}> className={cn('editor-container relative overflow-auto', containerClassName)}>
{children} {preEditorChildren}
<ThemeWrapper id={id}> <ThemeWrapper id={id}>
<Editor <Editor
style={style} style={style}

View File

@ -73,19 +73,20 @@ export const ReportPageController: React.FC<{
mode={mode} mode={mode}
onReady={onReadyProp} onReady={onReadyProp}
isStreaming={isStreamingMessage} isStreaming={isStreamingMessage}
preEditorChildren={
<ReportPageHeader
name={report?.name}
updatedAt={report?.updated_at}
onChangeName={onChangeName}
className={commonClassName}
isStreaming={isStreamingMessage}
/>
}
postEditorChildren={ postEditorChildren={
showGeneratingContent ? ( showGeneratingContent ? (
<GeneratingContent messageId={messageId} className={commonClassName} /> <GeneratingContent messageId={messageId} className={commonClassName} />
) : null ) : null
}> }></DynamicReportEditor>
<ReportPageHeader
name={report?.name}
updatedAt={report?.updated_at}
onChangeName={onChangeName}
className={commonClassName}
isStreaming={isStreamingMessage}
/>
</DynamicReportEditor>
) : ( ) : (
<ReportEditorSkeleton /> <ReportEditorSkeleton />
)} )}