Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Device manager - filter out nulled metadatas in device tile properly …
Browse files Browse the repository at this point in the history
…(PSG-703) (#9251)

* filter out nulled metadatas in device tile properly

* remove log
  • Loading branch information
Kerry committed Sep 12, 2022
1 parent 0ab476b commit d69393a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 27 deletions.
10 changes: 6 additions & 4 deletions src/components/views/settings/devices/DeviceTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,12 @@ const DeviceTile: React.FC<DeviceTileProps> = ({ device, children, onClick }) =>
<DeviceTileName device={device} />
<div className="mx_DeviceTile_metadata">
{ metadata.map(({ id, value }, index) =>
<Fragment key={id}>
{ !!index && ' · ' }
<DeviceMetadata id={id} value={value} />
</Fragment>,
!!value
? <Fragment key={id}>
{ !!index && ' · ' }
<DeviceMetadata id={id} value={value} />
</Fragment>
: null,
) }
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -259,8 +257,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -336,8 +332,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -283,8 +281,6 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ exports[`<DeviceTile /> renders a device with no metadata 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -83,8 +81,6 @@ exports[`<DeviceTile /> renders a verified device with no metadata 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -134,8 +130,6 @@ exports[`<DeviceTile /> renders display name with a tooltip 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ exports[`<SelectableDeviceTile /> renders unselected device tile with checkbox 1
Unverified
</span>
·
·
<span
data-testid="device-metadata-lastSeenIp"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ exports[`<SessionManagerTab /> renders current session section with a verified s
>
Verified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -181,8 +179,6 @@ exports[`<SessionManagerTab /> renders current session section with an unverifie
>
Unverified
</span>
·
·
</div>
</div>
<div
Expand Down Expand Up @@ -279,8 +275,6 @@ exports[`<SessionManagerTab /> sets device verification status correctly 1`] = `
>
Verified
</span>
·
·
</div>
</div>
<div
Expand Down

0 comments on commit d69393a

Please sign in to comment.