Device manager - filter out nulled metadatas in device tile properly (PSG-703) (#9251)

* filter out nulled metadatas in device tile properly

* remove log
This commit is contained in:
Kerry 2022-09-12 13:06:12 +02:00 committed by GitHub
parent 0ab476b828
commit d69393a3aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 27 deletions

View File

@ -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>

View File

@ -141,8 +141,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
@ -259,8 +257,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
@ -336,8 +332,6 @@ exports[`<DevicesPanel /> renders device panel with devices 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div

View File

@ -171,8 +171,6 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
>
Unverified
</span>
·
·
</div>
</div>
<div
@ -283,8 +281,6 @@ exports[`<CurrentDeviceSection /> renders device and correct security card when
>
Unverified
</span>
·
·
</div>
</div>
<div

View File

@ -36,8 +36,6 @@ exports[`<DeviceTile /> renders a device with no metadata 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
@ -83,8 +81,6 @@ exports[`<DeviceTile /> renders a verified device with no metadata 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div
@ -134,8 +130,6 @@ exports[`<DeviceTile /> renders display name with a tooltip 1`] = `
>
Unverified
</span>
·
·
</div>
</div>
<div

View File

@ -71,7 +71,6 @@ exports[`<SelectableDeviceTile /> renders unselected device tile with checkbox 1
Unverified
</span>
·
·
<span
data-testid="device-metadata-lastSeenIp"
>

View File

@ -83,8 +83,6 @@ exports[`<SessionManagerTab /> renders current session section with a verified s
>
Verified
</span>
·
·
</div>
</div>
<div
@ -181,8 +179,6 @@ exports[`<SessionManagerTab /> renders current session section with an unverifie
>
Unverified
</span>
·
·
</div>
</div>
<div
@ -279,8 +275,6 @@ exports[`<SessionManagerTab /> sets device verification status correctly 1`] = `
>
Verified
</span>
·
·
</div>
</div>
<div