Skip to content

Commit

Permalink
fix: socialLink
Browse files Browse the repository at this point in the history
  • Loading branch information
kuizuo committed Feb 5, 2024
1 parent f919930 commit 05a4338
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
26 changes: 13 additions & 13 deletions src/components/SocialLinks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ function SocialLink({ href, icon, title, color, ...prop }: Props) {
export default function SocialLinks({ ...prop }) {
return (
<div className={styles.socialLinks} {...prop}>
{Object.entries(social).map(([key, { href, icon, title, color }]) => {
if (!href) return <></>

return (
<SocialLink
key={key}
href={href}
title={title}
icon={icon}
style={{ '--color': color }}
></SocialLink>
)
})}
{Object.entries(social)
.filter(([_key, { href }]) => href)
.map(([key, { href, icon, title, color }]) => {
return (
<SocialLink
key={key}
href={href!}
title={title}
icon={icon}
style={{ '--color': color }}
></SocialLink>
)
})}
</div>
)
}
2 changes: 2 additions & 0 deletions src/components/SocialLinks/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@

@media (width <= 570px) {
.socialLinks {
justify-content: center;
flex-wrap: wrap;
gap: 0;
}
}
2 changes: 1 addition & 1 deletion src/pages/_components/FeaturesSection/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 05a4338

Please sign in to comment.