fix: cast LogEntryResponse to LogEntry for StartupLogPanel type safety
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:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user