Skip to content

Commit

Permalink
(fix) O3-4416 Remove duplicated tag definition in QueuePriority compo…
Browse files Browse the repository at this point in the history
…nent
  • Loading branch information
flosell committed Nov 22, 2024
1 parent 008f371 commit 5901211
Showing 1 changed file with 16 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,28 @@ interface QueuePriorityProps {

const QueuePriority: React.FC<QueuePriorityProps> = ({ priority, priorityComment, priorityConfigs }) => {
const priorityConfig = priorityConfigs.find((c) => c.conceptUuid === priority.uuid);

let tag = (
<Tag
role={priorityComment ? 'tooltip' : null}
className={classNames(
styles.tag,
priorityConfig?.style === 'bold' && styles.bold,
priorityConfig?.color === 'orange' && styles.orange,
)}
type={priorityConfig?.color !== 'orange' ? priorityConfig?.color : null}>
{priority.display}
</Tag>
);

return (
<>
{priorityComment ? (
<DefinitionTooltip className={styles.tooltip} align="bottom-left" definition={priorityComment}>
<Tag
role="tooltip"
className={classNames(
styles.tag,
priorityConfig?.style === 'bold' && styles.bold,
priorityConfig?.color === 'orange' && styles.orange,
)}
type={priorityConfig?.color !== 'orange' ? priorityConfig?.color : null}>
{priority.display}
</Tag>
{tag}
</DefinitionTooltip>
) : (
<Tag
className={classNames(
styles.tag,
priorityConfig?.style === 'bold' && styles.bold,
priorityConfig?.color === 'orange' && styles.orange,
)}
type={priorityConfig?.color !== 'orange' ? priorityConfig?.color : null}>
{priority.display}
</Tag>
tag
)}
</>
);
Expand Down

0 comments on commit 5901211

Please sign in to comment.