remove newTab prop of Nav
This commit is contained in:
parent
cd410c9bf3
commit
dd65f324e9
2 changed files with 1 additions and 5 deletions
|
@ -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>
|
||||||
))
|
))
|
||||||
|
|
|
@ -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,
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in a new issue