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