Skip to content

Commit

Permalink
fixed prereq box to only appear when there is text
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerpan committed Oct 17, 2023
1 parent 0c25e3a commit 8857059
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 @@ -154,18 +154,20 @@ const PrereqTree: FC<PrereqProps> = (props) => {
</div>} */}

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

0 comments on commit 8857059

Please sign in to comment.