fix: prevent empty code execution outputs after remount (#678)

This commit is contained in:
Jeremy 2025-01-08 16:37:49 +05:30 committed by GitHub
parent 1df0181035
commit 3e34d678b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 51 additions and 85 deletions

View file

@ -124,14 +124,16 @@ export function Console({ consoleOutputs, setConsoleOutputs }: ConsoleProps) {
consoleOutput.status,
) ? (
<div className="flex flex-row gap-2">
<div className="animate-spin size-fit self-center">
<div className="animate-spin size-fit self-center mb-auto mt-0.5">
<LoaderIcon />
</div>
<div className="text-muted-foreground">
{consoleOutput.status === 'in_progress'
? 'Initializing...'
: consoleOutput.status === 'loading_packages'
? 'Loading Packages...'
? consoleOutput.contents.map((content) =>
content.type === 'text' ? content.value : null,
)
: null}
</div>
</div>