mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
Replace socialLinks array with SOCIALS config
This commit is contained in:
+11
-12
@@ -1,7 +1,8 @@
|
||||
---
|
||||
import socialIcons from "@assets/socialIcons";
|
||||
import { SOCIALS } from "src/config";
|
||||
import Hr from "./Hr.astro";
|
||||
import LinkButton from "./LinkButton.astro";
|
||||
import socialLinks from "@utils/socialLinks";
|
||||
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
@@ -17,17 +18,15 @@ const { noMarginTop = false } = Astro.props;
|
||||
<div class="footer-wrapper">
|
||||
<div class="social-icons">
|
||||
{
|
||||
socialLinks
|
||||
.filter((socialLink) => socialLink.active)
|
||||
.map((socialLink) => (
|
||||
<LinkButton
|
||||
href={socialLink.href}
|
||||
className="link-button"
|
||||
title={socialLink.name}
|
||||
>
|
||||
<Fragment set:html={socialLink.icon} />
|
||||
</LinkButton>
|
||||
))
|
||||
SOCIALS.filter((social) => social.active).map((social) => (
|
||||
<LinkButton
|
||||
href={social.href}
|
||||
className="link-button"
|
||||
title={social.name}
|
||||
>
|
||||
<Fragment set:html={socialIcons[social.name]} />
|
||||
</LinkButton>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<div class="copyright-wrapper">
|
||||
|
||||
Reference in New Issue
Block a user