feat(SW-185): fix typo and updated with aria-label
This commit is contained in:
@@ -9,9 +9,9 @@ import { footer } from "../mockedData"
|
||||
|
||||
import styles from "./details.module.css"
|
||||
|
||||
import type { IconName } from "@/types/components/icon"
|
||||
import { IconName } from "@/types/components/icon"
|
||||
|
||||
function socialIcon(iconName: string): JSX.Element | null {
|
||||
function SocialIcon({ iconName }: { iconName: string }) {
|
||||
const SocialIcon = getIconByIconName(iconName as IconName)
|
||||
return SocialIcon ? <SocialIcon color="white" /> : <span>{iconName}</span>
|
||||
}
|
||||
@@ -49,9 +49,9 @@ export default function FooterDetails() {
|
||||
href={link.href}
|
||||
key={link.id}
|
||||
target="_blank"
|
||||
title={link.title}
|
||||
aria-label={link.title}
|
||||
>
|
||||
{socialIcon(link.title)}
|
||||
<SocialIcon iconName={link.title} />
|
||||
</a>
|
||||
))}
|
||||
</nav>
|
||||
@@ -74,7 +74,6 @@ export default function FooterDetails() {
|
||||
color="peach50"
|
||||
href={link.href}
|
||||
target="_blank"
|
||||
title={link.title}
|
||||
>
|
||||
{link.title}
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user