Skip to content

Commit

Permalink
fix(account-card): fix cloud-account type
Browse files Browse the repository at this point in the history
  • Loading branch information
sijav committed Oct 30, 2023
1 parent 338da7a commit e178430
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pages/panel/panel-home/AccountCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const AccountCardContainer = styled(Card, { shouldForwardProp })<{ background: s
export const AccountCard = ({ account, score }: { account: Account; score?: number }) => {
return (
<AccountCardContainer background={score !== undefined ? colorFromRedToGreen[score] : 'info.main'}>
<CardHeader title={snakeCaseWordsToUFStr(account.name)} />
<CardHeader title={snakeCaseWordsToUFStr(account.name ?? account.id)} />
<CardContent>
<Typography>ID: {account.id}</Typography>
<Typography>Cloud: {account.cloud.toUpperCase()}</Typography>
<Typography>Cloud: {account.cloud?.toUpperCase()}</Typography>
{score !== undefined ? <Typography>Score: {score}</Typography> : undefined}
</CardContent>
</AccountCardContainer>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/types/server/responses/shared/Account.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface Account {
id: string
name: string
name: string | null
cloud: string
account_id: string
}

0 comments on commit e178430

Please sign in to comment.