Skip to content

Commit

Permalink
Fix deck placeholder overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haakonsf committed Aug 30, 2024
1 parent 8cf2c61 commit 86363dd
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions frontend/src/components/Pages/InspectionPage/DeckCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,24 +112,26 @@ export const DeckCards = ({ deckMissions, onClickDeck, selectedDeck, handleSched
const { TranslateText } = useLanguageContext()

return (
<StyledDict.DeckCards>
<>
{Object.keys(deckMissions).length > 0 ? (
deckMissions.map((deckMission) => (
<DeckCard
key={'deckCard' + deckMission.deck.deckName}
deckData={deckMission}
onClickDeck={onClickDeck}
selectedDeck={selectedDeck}
handleScheduleAll={handleScheduleAll}
/>
))
<StyledDict.DeckCards>
{deckMissions.map((deckMission) => (
<DeckCard
key={'deckCard' + deckMission.deck.deckName}
deckData={deckMission}
onClickDeck={onClickDeck}
selectedDeck={selectedDeck}
handleScheduleAll={handleScheduleAll}
/>
))}
</StyledDict.DeckCards>
) : (
<StyledDict.Placeholder>
<Typography variant="h4" color="disabled">
{TranslateText('No deck inspections available')}
</Typography>
</StyledDict.Placeholder>
)}
</StyledDict.DeckCards>
</>
)
}

0 comments on commit 86363dd

Please sign in to comment.