Files
atridotdad/src/components/SocialLinks.astro
Atridad Lahiji 9dbdd265ba
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled
Removed spotify... its hard to maintain and also fuck spotify
2025-06-27 15:44:43 -06:00

32 lines
922 B
Plaintext

---
import { Icon } from "astro-icon/components";
import { socialLinks } from "../config/data";
// Helper function to check if icon is a string (Astro icon)
function isAstroIcon(icon: any): icon is string {
return typeof icon === "string";
}
---
<div class="flex flex-row gap-4 text-3xl">
{
socialLinks.map((link) => {
return (
<a
href={link.url}
target={link.url.startsWith("http") ? "_blank" : undefined}
rel={
link.url.startsWith("http")
? "noopener noreferrer"
: undefined
}
aria-label={link.ariaLabel}
class="hover:text-primary transition-colors"
>
<Icon name={link.icon} />
</a>
);
})
}
</div>