Skip to content

Commit 0f56e1a

Browse files
committed
style the cards on the units listing page with height: 100% so that the cards are all even height, regardless of the content of other cards in the grid
1 parent 56045ad commit 0f56e1a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

frontends/mit-open/src/pages/UnitsListingPage/UnitsListingPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ const PageHeaderText = styled(Typography)(({ theme }) => ({
8989
...theme.typography.subtitle1,
9090
}))
9191

92+
const CardStyled = styled(Card)({
93+
height: "100%",
94+
})
95+
9296
const UnitContainer = styled.div(({ theme }) => ({
9397
display: "flex",
9498
flexDirection: "column",
@@ -306,7 +310,7 @@ const UnitCard: React.FC<UnitCardProps> = (props) => {
306310
return channelDetailQuery.isLoading ? (
307311
<UnitCardLoading />
308312
) : (
309-
<Card href={unitUrl}>
313+
<CardStyled href={unitUrl}>
310314
<Card.Content>
311315
<UnitCardContainer>
312316
<UnitCardContent>
@@ -327,7 +331,7 @@ const UnitCard: React.FC<UnitCardProps> = (props) => {
327331
</UnitCardContent>
328332
</UnitCardContainer>
329333
</Card.Content>
330-
</Card>
334+
</CardStyled>
331335
)
332336
}
333337

0 commit comments

Comments
 (0)