Skip to content

Commit 4f2a270

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 1216a43 commit 4f2a270

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
@@ -91,6 +91,10 @@ const PageHeaderText = styled(Typography)(({ theme }) => ({
9191
...theme.typography.subtitle1,
9292
}))
9393

94+
const CardStyled = styled(Card)({
95+
height: "100%",
96+
})
97+
9498
const UnitContainer = styled.div(({ theme }) => ({
9599
display: "flex",
96100
flexDirection: "column",
@@ -308,7 +312,7 @@ const UnitCard: React.FC<UnitCardProps> = (props) => {
308312
return channelDetailQuery.isLoading ? (
309313
<UnitCardLoading />
310314
) : (
311-
<Card href={unitUrl}>
315+
<CardStyled href={unitUrl}>
312316
<Card.Content>
313317
<UnitCardContainer>
314318
<UnitCardContent>
@@ -329,7 +333,7 @@ const UnitCard: React.FC<UnitCardProps> = (props) => {
329333
</UnitCardContent>
330334
</UnitCardContainer>
331335
</Card.Content>
332-
</Card>
336+
</CardStyled>
333337
)
334338
}
335339

0 commit comments

Comments
 (0)