Skip to content

Commit

Permalink
fix(default-icon): use nodes icon as default icon with label badges
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Oct 28, 2024
1 parent 2fc153a commit b1dc985
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/common/TypeBadge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,55 @@ export const TypeBadge = ({ type }: Props) => {

const isIconPresent = primaryIcon && primaryIcon in Icons

const icon = isIconPresent ? `svg-icons/${primaryIcon}.svg` : null
const icon = isIconPresent ? `svg-icons/${primaryIcon}.svg` : 'svg-icons/NodesIcon.svg'

switch (nodeType) {
case 'video':
case 'twitter_space':
case 'podcast':
case 'clip':
badgeProps = {
iconStart: icon ?? 'video_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.CLIP,
}

break

case 'show':
badgeProps = {
iconStart: icon ?? 'show_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.SHOW,
}

break

case 'tweet':
badgeProps = {
iconStart: icon ?? 'twitter_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.TWEET,
}

break

case 'episode':
badgeProps = {
iconStart: icon ?? 'audio_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.EPISODE,
}

break

case 'document':
badgeProps = {
iconStart: icon ?? 'notes_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.TEXT,
}

break

case primaryIcon ?? 'organization':
badgeProps = {
iconStart: icon ?? 'organization_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.ORGANIZATION,
}

Expand All @@ -82,31 +82,31 @@ export const TypeBadge = ({ type }: Props) => {
case 'guest':
case 'host':
badgeProps = {
iconStart: icon ?? 'person_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.PERSON,
}

break

case 'event':
badgeProps = {
iconStart: icon ?? 'event_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.EVENT,
}

break

case 'topic':
badgeProps = {
iconStart: icon ?? 'topic_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.TOPIC,
}

break

default:
badgeProps = {
iconStart: icon ?? 'thing_badge.svg',
iconStart: icon,
color: primaryColor ?? colors.THING,
}

Expand Down

0 comments on commit b1dc985

Please sign in to comment.