Skip to content
Snippets Groups Projects
Commit a1b1e7c4 authored by Andrey Loginov's avatar Andrey Loginov
Browse files

Merge branch 'fix/MRM-4475' into 'release/v0.14'

fix: [MRM-4475] Hide street/building if empty

See merge request mashroom/frontend/admin!77

(cherry picked from commit 905cffe8)

0db4a3d2 fix: [MRM-4475] Hide street/building if empty
parent 71319df3
No related merge requests found
......@@ -32,35 +32,35 @@ const HomeAddress: FC<Props> = ({ location }) => {
country,
} = location;
const homeAddress = [address1, address2, address3, address4]
.filter(Boolean)
.join(", ");
return (
<Group>
<FormRow>
<Name>Home address</Name>
<Value>
{[address1, address2, address3, address4].filter(Boolean).join(", ")}
</Value>
<Value>{homeAddress !== "" ? homeAddress : "N/A"}</Value>
</FormRow>
<FormRow>
<Row>
<Col>
<Name>Street / Building</Name>
<Value>{[street, building].filter(Boolean).join(", ")}</Value>
</Col>
{((street && street !== "") || (building && building !== "")) && (
<Col>
<Name>Street / Building</Name>
<Value>{[street, building].filter(Boolean).join(", ")}</Value>
</Col>
)}
<Col>
<Name>City / Town</Name>
<Value>{city || "N/A"}</Value>
<Value>{city && city !== "" ? city : "N/A"}</Value>
</Col>
</Row>
</FormRow>
<FormRow>
<Row>
<Col>
<Name>Postcode</Name>
<Value>{postcode || "N/A"}</Value>
<Value>{postcode && postcode !== "" ? postcode : "N/A"}</Value>
</Col>
<Col>
<Name>Country</Name>
<Value>{country || "N/A"}</Value>
<Value>{country && country !== "" ? country : "N/A"}</Value>
</Col>
</Row>
</FormRow>
......
......@@ -24,11 +24,12 @@ export const UserAvatarSmall = styled.img`
margin: 0 20px 0 0;
background: ${theme.colors.main.midGrey};
border-radius: 50%;
object-fix: cover;
object-fit: cover;
`;
export const UserDetails = styled.div`
width: calc(50% - 15px);
margin-bottom: 4px;
`;
export const UserItem = styled.div`
......@@ -69,6 +70,7 @@ export const UserLastUpdate = styled.div`
export const UserFlexRow = styled.div`
display: flex;
justify-content: space-between;
flex-wrap: wrap;
`;
export const StatusDanger = styled.span`
color: ${theme.colors.main.red};
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment