remove newTab prop of Nav

This commit is contained in:
Ayo 2023-05-27 22:22:46 +02:00
parent cd410c9bf3
commit dd65f324e9
2 changed files with 1 additions and 5 deletions

View file

@ -3,7 +3,6 @@ import Icon from "astro-icon";
export type Link = { export type Link = {
url: string; url: string;
icon: string; icon: string;
newTab?: boolean;
}; };
export interface Props { export interface Props {
@ -19,7 +18,7 @@ const { links } = Astro.props;
links links
.filter((link) => link.url !== "") .filter((link) => link.url !== "")
.map((link) => ( .map((link) => (
<a href={link.url} target={link.newTab ? "_blank" : null}> <a href={link.url}>
<Icon pack="mdi" name={link.icon} /> {link.icon} <Icon pack="mdi" name={link.icon} /> {link.icon}
</a> </a>
)) ))

View file

@ -17,17 +17,14 @@ const links: Link[] = [
{ {
url: "https://ayos.blog", url: "https://ayos.blog",
icon: "blog", icon: "blog",
newTab: true,
}, },
{ {
url: "https://ayco.io/@ayo", url: "https://ayco.io/@ayo",
icon: "mastodon", icon: "mastodon",
newTab: true,
}, },
{ {
url: "https://ayco.io/github", url: "https://ayco.io/github",
icon: "github", icon: "github",
newTab: true,
}, },
]; ];
--- ---