fix: cast LogEntryResponse to LogEntry for StartupLogPanel type safety
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / docker (push) Has been cancelled
CI / deploy (push) Has been cancelled
CI / deploy-feature (push) Has been cancelled
CI / build (push) Has been cancelled

The DS LogViewer expects level as a string union, but the API response
type uses plain string. Cast at the call site to fix the TS build error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-14 23:56:01 +02:00
parent 7a63135d26
commit 33b0bc4d98

View File

@@ -1,4 +1,5 @@
import { LogViewer } from '@cameleer/design-system';
import type { LogEntry } from '@cameleer/design-system';
import { useStartupLogs } from '../api/queries/logs';
import type { Deployment } from '../api/queries/admin/apps';
import styles from './StartupLogPanel.module.css';
@@ -37,7 +38,7 @@ export function StartupLogPanel({ deployment, appSlug, envSlug }: StartupLogPane
<span className={styles.lineCount}>{entries.length} lines</span>
</div>
{entries.length > 0 ? (
<LogViewer entries={entries} maxHeight={300} />
<LogViewer entries={entries as unknown as LogEntry[]} maxHeight={300} />
) : (
<div className={styles.empty}>Waiting for container output...</div>
)}