Skip to content

Commit

Permalink
fix social icons not displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Jan 14, 2025
1 parent dc673d7 commit 174bca9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/assets/social/DynamicSocialIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import dynamic from 'next/dynamic'
import { SVGProps } from 'react'

import { QuestionCircleSVG } from '@ensdomains/thorin'

Expand Down Expand Up @@ -34,11 +35,10 @@ export const DynamicSocialIcon = ({
}: {
name: keyof typeof socialIconTypes | string
showDefault?: boolean
fill?: string
}) => {
} & Omit<SVGProps<SVGSVGElement>, 'name'>) => {
if (name in socialIconTypes) {
const key = name as keyof typeof socialIconTypes
const Icon = socialIconTypes[key] as any
const Icon = socialIconTypes[key]
const fill = socialIconColors[key]
return <Icon {...props} fill={fill} />
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/pages/profile/ProfileButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ export const SocialProfileButton = ({
<RecordItem
icon={() => (
<DynamicSocialIcon
height={20}
width={20}
fill={socialData.color}
name={socialData.icon as keyof typeof socialIconTypes}
/>
Expand Down

0 comments on commit 174bca9

Please sign in to comment.