From 05a4338333186400ec41cc94cd95195390fd2061 Mon Sep 17 00:00:00 2001 From: Kuizuo Date: Mon, 5 Feb 2024 17:58:12 +0800 Subject: [PATCH] fix: socialLink --- src/components/SocialLinks/index.tsx | 26 +++++++++---------- src/components/SocialLinks/styles.module.scss | 2 ++ .../FeaturesSection/styles.module.scss | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/components/SocialLinks/index.tsx b/src/components/SocialLinks/index.tsx index 6e67db55..93dd7499 100644 --- a/src/components/SocialLinks/index.tsx +++ b/src/components/SocialLinks/index.tsx @@ -37,19 +37,19 @@ function SocialLink({ href, icon, title, color, ...prop }: Props) { export default function SocialLinks({ ...prop }) { return (
- {Object.entries(social).map(([key, { href, icon, title, color }]) => { - if (!href) return <> - - return ( - - ) - })} + {Object.entries(social) + .filter(([_key, { href }]) => href) + .map(([key, { href, icon, title, color }]) => { + return ( + + ) + })}
) } diff --git a/src/components/SocialLinks/styles.module.scss b/src/components/SocialLinks/styles.module.scss index 536e0eb0..c12c4ff2 100644 --- a/src/components/SocialLinks/styles.module.scss +++ b/src/components/SocialLinks/styles.module.scss @@ -59,6 +59,8 @@ @media (width <= 570px) { .socialLinks { + justify-content: center; + flex-wrap: wrap; gap: 0; } } diff --git a/src/pages/_components/FeaturesSection/styles.module.scss b/src/pages/_components/FeaturesSection/styles.module.scss index da6ddb4a..3788e663 100644 --- a/src/pages/_components/FeaturesSection/styles.module.scss +++ b/src/pages/_components/FeaturesSection/styles.module.scss @@ -38,7 +38,7 @@ html[data-theme='dark'] .feature:hover { @media (width <= 768px) { .features { - grid-template-columns: repeat(1, 1fr); + grid-template-columns: 1fr; gap: 0.75rem; } }