Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Sep 24, 2024
1 parent d228a56 commit dbe3493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teachertool/src/components/CriteriaInstanceDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ const BlockInputSegment: React.FC<BlockInputSegmentProps> = ({ instance, param }
}, [param.value, teacherTool.toolboxCategories]);

const style = blockData ? { backgroundColor: blockData.category.color, color: "white" } : undefined;
const blockDisplay = blockData ? <ReadableBlockName blockData={blockData} /> : null;
const blockDisplay = blockData ? <ReadableBlockName blockData={blockData} /> : param.value || param.name;
return (
<Button
label={blockDisplay || param.value || param.name}
label={blockDisplay}
className={classList(css["block-input-btn"], param.value ? undefined : css["error"])}
onClick={handleClick}
title={param.value ? Strings.SelectBlock : `${Strings.SelectBlock}: ${Strings.ValueRequired}`}
Expand Down

0 comments on commit dbe3493

Please sign in to comment.