From b1dc985516490e59496a7d6e1d706c1d7a5d0b32 Mon Sep 17 00:00:00 2001 From: MahtabBukhari Date: Mon, 28 Oct 2024 22:55:31 +0500 Subject: [PATCH] fix(default-icon): use nodes icon as default icon with label badges --- src/components/common/TypeBadge/index.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/common/TypeBadge/index.tsx b/src/components/common/TypeBadge/index.tsx index e68b00178..fe53222b6 100644 --- a/src/components/common/TypeBadge/index.tsx +++ b/src/components/common/TypeBadge/index.tsx @@ -24,7 +24,7 @@ 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': @@ -32,7 +32,7 @@ export const TypeBadge = ({ type }: Props) => { case 'podcast': case 'clip': badgeProps = { - iconStart: icon ?? 'video_badge.svg', + iconStart: icon, color: primaryColor ?? colors.CLIP, } @@ -40,7 +40,7 @@ export const TypeBadge = ({ type }: Props) => { case 'show': badgeProps = { - iconStart: icon ?? 'show_badge.svg', + iconStart: icon, color: primaryColor ?? colors.SHOW, } @@ -48,7 +48,7 @@ export const TypeBadge = ({ type }: Props) => { case 'tweet': badgeProps = { - iconStart: icon ?? 'twitter_badge.svg', + iconStart: icon, color: primaryColor ?? colors.TWEET, } @@ -56,7 +56,7 @@ export const TypeBadge = ({ type }: Props) => { case 'episode': badgeProps = { - iconStart: icon ?? 'audio_badge.svg', + iconStart: icon, color: primaryColor ?? colors.EPISODE, } @@ -64,7 +64,7 @@ export const TypeBadge = ({ type }: Props) => { case 'document': badgeProps = { - iconStart: icon ?? 'notes_badge.svg', + iconStart: icon, color: primaryColor ?? colors.TEXT, } @@ -72,7 +72,7 @@ export const TypeBadge = ({ type }: Props) => { case primaryIcon ?? 'organization': badgeProps = { - iconStart: icon ?? 'organization_badge.svg', + iconStart: icon, color: primaryColor ?? colors.ORGANIZATION, } @@ -82,7 +82,7 @@ export const TypeBadge = ({ type }: Props) => { case 'guest': case 'host': badgeProps = { - iconStart: icon ?? 'person_badge.svg', + iconStart: icon, color: primaryColor ?? colors.PERSON, } @@ -90,7 +90,7 @@ export const TypeBadge = ({ type }: Props) => { case 'event': badgeProps = { - iconStart: icon ?? 'event_badge.svg', + iconStart: icon, color: primaryColor ?? colors.EVENT, } @@ -98,7 +98,7 @@ export const TypeBadge = ({ type }: Props) => { case 'topic': badgeProps = { - iconStart: icon ?? 'topic_badge.svg', + iconStart: icon, color: primaryColor ?? colors.TOPIC, } @@ -106,7 +106,7 @@ export const TypeBadge = ({ type }: Props) => { default: badgeProps = { - iconStart: icon ?? 'thing_badge.svg', + iconStart: icon, color: primaryColor ?? colors.THING, }