@@ -191,11 +215,14 @@ function DeviceManage() {
)}
{isCurrentDevice && (
- {`Session Key: ${mx.getDeviceEd25519Key().match(/.{1,4}/g).join(' ')}`}
+ {`Session Key: ${mx
+ .getDeviceEd25519Key()
+ .match(/.{1,4}/g)
+ .join(' ')}`}
)}
>
- )}
+ }
/>
);
};
@@ -203,16 +230,18 @@ function DeviceManage() {
const unverified = [];
const verified = [];
const noEncryption = [];
- deviceList.sort((a, b) => b.last_seen_ts - a.last_seen_ts).forEach((device) => {
- const isVerified = isCrossVerified(mx, device.device_id);
- if (isVerified === true) {
- verified.push(device);
- } else if (isVerified === false) {
- unverified.push(device);
- } else {
- noEncryption.push(device);
- }
- });
+ deviceList
+ .sort((a, b) => b.last_seen_ts - a.last_seen_ts)
+ .forEach((device) => {
+ const isVerified = isCrossVerified(mx, device.device_id);
+ if (isVerified === true) {
+ verified.push(device);
+ } else if (isVerified === false) {
+ unverified.push(device);
+ } else {
+ noEncryption.push(device);
+ }
+ });
return (
@@ -247,35 +276,37 @@ function DeviceManage() {
/>
)}
- {
- unverified.length > 0
- ? unverified.map((device) => renderDevice(device, false))
- :
No unverified sessions
- }
+ {unverified.length > 0 ? (
+ unverified.map((device) => renderDevice(device, false))
+ ) : (
+
No unverified sessions
+ )}
{noEncryption.length > 0 && (
-
- Sessions without encryption support
- {noEncryption.map((device) => renderDevice(device, null))}
-
+
+ Sessions without encryption support
+ {noEncryption.map((device) => renderDevice(device, null))}
+
)}
Verified sessions
- {
- verified.length > 0
- ? verified.map((device, index) => {
- if (truncated && index >= TRUNCATED_COUNT) return null;
- return renderDevice(device, true);
- })
- : No verified sessions
- }
- { verified.length > TRUNCATED_COUNT && (
+ {verified.length > 0 ? (
+ verified.map((device, index) => {
+ if (truncated && index >= TRUNCATED_COUNT) return null;
+ return renderDevice(device, true);
+ })
+ ) : (
+ No verified sessions
+ )}
+ {verified.length > TRUNCATED_COUNT && (
)}
- { deviceList.length > 0 && (
- Session names are visible to everyone, so do not put any private info here.
+ {deviceList.length > 0 && (
+
+ Session names are visible to everyone, so do not put any private info here.
+
)}
diff --git a/src/app/pages/client/sidebar/UnverifiedTab.tsx b/src/app/pages/client/sidebar/UnverifiedTab.tsx
index 919c4a70..ecd047c4 100644
--- a/src/app/pages/client/sidebar/UnverifiedTab.tsx
+++ b/src/app/pages/client/sidebar/UnverifiedTab.tsx
@@ -15,7 +15,7 @@ import * as css from './UnverifiedTab.css';
export function UnverifiedTab() {
const mx = useMatrixClient();
- const deviceList = useDeviceList();
+ const [deviceList] = useDeviceList();
const unverified = deviceList?.filter(
(device) => isCrossVerified(mx, device.device_id) === false
);