fix: restore code block loading states (#728)

This commit is contained in:
Jeremy 2025-01-27 19:23:16 +05:30 committed by GitHub
parent 38527ff92e
commit 085f4a8ac4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 269 additions and 136 deletions

View file

@ -80,18 +80,22 @@ export const textBlock = new Block<'text', TextBlockMetadata>({
return (
<>
<Editor
content={content}
suggestions={metadata ? metadata.suggestions : []}
isCurrentVersion={isCurrentVersion}
currentVersionIndex={currentVersionIndex}
status={status}
onSaveContent={onSaveContent}
/>
<div className="flex flex-row py-8 md:p-20 px-4">
<Editor
content={content}
suggestions={metadata ? metadata.suggestions : []}
isCurrentVersion={isCurrentVersion}
currentVersionIndex={currentVersionIndex}
status={status}
onSaveContent={onSaveContent}
/>
{metadata && metadata.suggestions && metadata.suggestions.length > 0 ? (
<div className="md:hidden h-dvh w-12 shrink-0" />
) : null}
{metadata &&
metadata.suggestions &&
metadata.suggestions.length > 0 ? (
<div className="md:hidden h-dvh w-12 shrink-0" />
) : null}
</div>
</>
);
},