mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-15 13:12:22 +01:00
Fix lint issues
This commit is contained in:
1 parent
d550b42ca3
commit
9970d5fa6f
2 files changed
+4
-4
No files matched your search
@@ -193,7 +193,7 @@ function EventDetails({
|
||||
`${String(e.duration)}ms`
|
||||
)}
|
||||
</KeyValueRow>
|
||||
{e.overridden && <KeyValueRow label="Source">Workspace Override</KeyValueRow>}
|
||||
{e.overridden ? <KeyValueRow label="Source">Workspace Override</KeyValueRow> : null}
|
||||
</KeyValueRows>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
||||
interface Props {
|
||||
children:
|
||||
| ReactElement<HTMLAttributes<HTMLTableColElement>>
|
||||
| ReactElement<HTMLAttributes<HTMLTableColElement>>[];
|
||||
| (ReactElement<HTMLAttributes<HTMLTableColElement>> | null)[];
|
||||
}
|
||||
|
||||
export function KeyValueRows({ children }: Props) {
|
||||
children = Array.isArray(children) ? children : [children];
|
||||
const childArray = Array.isArray(children) ? children.filter(Boolean) : [children];
|
||||
return (
|
||||
<table className="text-editor font-mono min-w-0 w-full mb-auto">
|
||||
<tbody className="divide-y divide-surface-highlight">
|
||||
{children.map((child, i) => (
|
||||
{childArray.map((child, i) => (
|
||||
// biome-ignore lint/suspicious/noArrayIndexKey: none
|
||||
<tr key={i}>{child}</tr>
|
||||
))}
|
||||
|
||||
Reference in new issue
Block a user