Skip to content

Commit

Permalink
Polish address display
Browse files Browse the repository at this point in the history
  • Loading branch information
CarsonF committed Nov 30, 2023
1 parent 573f2fd commit 5fe6e28
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/scenes/Partners/Detail/Tabs/Profile/PartnerContactSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Skeleton, Tooltip, Typography } from '@mui/material';
import { canEditAny } from '~/common';
import { ActionableSection } from '~/components/ActionableSection';
import { IconButton } from '~/components/IconButton';
import { Redacted } from '~/components/Redacted';
import { PartnerDetailsFragment } from '../../PartnerDetail.graphql';

interface PartnerContactSectionProps {
Expand Down Expand Up @@ -35,14 +36,29 @@ export const PartnerContactSection = ({
</Tooltip>
}
>
<Typography variant="body2" color="textSecondary" gutterBottom>
<Typography
component="h4"
variant="body2"
color="textSecondary"
gutterBottom
>
Business Address
</Typography>
<Typography variant="h4">
{!partner?.address.value ? (
<Typography component="p" variant="h4">
{!partner ? (
<Skeleton width="75%" />
) : (
) : !partner.address.canRead ? (
<Redacted info="You cannot view this partner's code" width="75%" />
) : partner.address.value ? (
partner.address.value
) : (
<Typography
variant="inherit"
color="text.secondary"
sx={{ fontStyle: 'italic' }}
>
None
</Typography>
)}
</Typography>
</ActionableSection>
Expand Down

0 comments on commit 5fe6e28

Please sign in to comment.