fix: soo many lint errors

This commit is contained in:
Max Richter
2025-11-03 00:03:27 +01:00
parent c13420c3ab
commit 696082250d
41 changed files with 373 additions and 500 deletions

View File

@@ -104,7 +104,7 @@ function Header({ children }: { children: ComponentChildren }) {
function Subline(
{ entries, children }: {
children?: ComponentChildren;
entries: (string | { href: string; title: string })[];
entries: (string | undefined | { href: string; title: string })[];
},
) {
const ctx = useContext(HeroContext);
@@ -117,10 +117,11 @@ function Subline(
{entries.filter((s) =>
s && (typeof s === "string" ? s?.length > 1 : true)
).map((s) => {
if (!s) return;
if (typeof s === "string") {
return <span>{s}</span>;
return <span key={s}>{s}</span>;
} else {
return <a href={s.href}>{s.title}</a>;
return <a key={s.href} href={s.href}>{s.title}</a>;
}
})}
</div>