fix(links): simplify TOP_ICON_LINKS rendering as standard anchors
This commit is contained in:
@@ -159,8 +159,14 @@ export function LinksContent() {
|
|||||||
<div className="grid gap-2 sm:grid-cols-2">
|
<div className="grid gap-2 sm:grid-cols-2">
|
||||||
{TOP_ICON_LINKS.map((item) => {
|
{TOP_ICON_LINKS.map((item) => {
|
||||||
const href = item.id === "cv" ? `/resume-${locale}.pdf` : item.href;
|
const href = item.id === "cv" ? `/resume-${locale}.pdf` : item.href;
|
||||||
const isStaticOrExternal = item.external || item.id === "rss" || item.id === "cv";
|
return (
|
||||||
const CardContent = (
|
<a
|
||||||
|
key={item.id}
|
||||||
|
href={href}
|
||||||
|
target={item.id === "cv" || item.external ? "_blank" : undefined}
|
||||||
|
rel={item.id === "cv" || item.external ? "noreferrer" : undefined}
|
||||||
|
className="block"
|
||||||
|
>
|
||||||
<Card className="rounded-2xl border-border bg-muted/35 p-3 transition-all hover:-translate-y-0.5 hover:border-red-600/40 hover:bg-background">
|
<Card className="rounded-2xl border-border bg-muted/35 p-3 transition-all hover:-translate-y-0.5 hover:border-red-600/40 hover:bg-background">
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<span className="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-background text-muted-foreground">
|
<span className="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl border border-border bg-background text-muted-foreground">
|
||||||
@@ -179,28 +185,7 @@ export function LinksContent() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
|
||||||
|
|
||||||
return isStaticOrExternal ? (
|
|
||||||
<a
|
|
||||||
key={item.id}
|
|
||||||
href={href}
|
|
||||||
target={item.id === "cv" || item.external ? "_blank" : undefined}
|
|
||||||
rel={item.id === "cv" || item.external ? "noreferrer" : undefined}
|
|
||||||
className="block"
|
|
||||||
>
|
|
||||||
{CardContent}
|
|
||||||
</a>
|
</a>
|
||||||
) : (
|
|
||||||
<Link
|
|
||||||
key={item.id}
|
|
||||||
href={href}
|
|
||||||
target={item.external ? "_blank" : undefined}
|
|
||||||
rel={item.external ? "noreferrer" : undefined}
|
|
||||||
className="block"
|
|
||||||
>
|
|
||||||
{CardContent}
|
|
||||||
</Link>
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user