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,11 +73,7 @@ export const ReportPageController: React.FC<{
mode={mode} mode={mode}
onReady={onReadyProp} onReady={onReadyProp}
isStreaming={isStreamingMessage} isStreaming={isStreamingMessage}
postEditorChildren={ preEditorChildren={
showGeneratingContent ? (
<GeneratingContent messageId={messageId} className={commonClassName} />
) : null
}>
<ReportPageHeader <ReportPageHeader
name={report?.name} name={report?.name}
updatedAt={report?.updated_at} updatedAt={report?.updated_at}
@ -85,7 +81,12 @@ export const ReportPageController: React.FC<{
className={commonClassName} className={commonClassName}
isStreaming={isStreamingMessage} isStreaming={isStreamingMessage}
/> />
</DynamicReportEditor> }
postEditorChildren={
showGeneratingContent ? (
<GeneratingContent messageId={messageId} className={commonClassName} />
) : null
}></DynamicReportEditor>
) : ( ) : (
<ReportEditorSkeleton /> <ReportEditorSkeleton />
)} )}