fix: soo many lint errors
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user