Skip to content

Commit

Permalink
fixed prereq box to only appear when there is text (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerpan authored and ecxyzzy committed Dec 4, 2023
1 parent e20bb5b commit 4796fe2
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions site/src/component/PrereqTree/PrereqTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,20 @@ const PrereqTree: FC<PrereqProps> = (props) => {
</div>} */}

</div>
<div
style={{
padding: '1em',
backgroundColor: '#f5f5f5',
marginTop: '2em',
}}
>
<p>
{props.prerequisiteText !== '' && <b>Prerequisite: </b>}
{props.prerequisiteText}
</p>
</div>
{props.prerequisiteText !== '' && (
<div
style={{
padding: '1em',
backgroundColor: '#f5f5f5',
marginTop: '2em',
}}
>
<p>
<b>Prerequisite: </b>
{props.prerequisiteText}
</p>
</div>
)}
</Grid.Row>
</div>
);
Expand Down

0 comments on commit 4796fe2

Please sign in to comment.