From def895df97f7c544bf1cbd852e8e196e5035e70a Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Thu, 12 Jan 2023 18:22:07 -0500 Subject: [PATCH] chore(recordings): use array destructure --- src/app/Recordings/ActiveRecordingsTable.tsx | 16 ++++------------ src/app/Recordings/ArchivedRecordingsTable.tsx | 12 +++--------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/app/Recordings/ActiveRecordingsTable.tsx b/src/app/Recordings/ActiveRecordingsTable.tsx index eef1454cb..3c7d45baa 100644 --- a/src/app/Recordings/ActiveRecordingsTable.tsx +++ b/src/app/Recordings/ActiveRecordingsTable.tsx @@ -206,9 +206,7 @@ export const ActiveRecordingsTable: React.FunctionComponent { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; } @@ -225,9 +223,7 @@ export const ActiveRecordingsTable: React.FunctionComponent { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; } @@ -243,9 +239,7 @@ export const ActiveRecordingsTable: React.FunctionComponent { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; } @@ -276,9 +270,7 @@ export const ActiveRecordingsTable: React.FunctionComponent { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; } diff --git a/src/app/Recordings/ArchivedRecordingsTable.tsx b/src/app/Recordings/ArchivedRecordingsTable.tsx index 671152bb0..a4f69d059 100644 --- a/src/app/Recordings/ArchivedRecordingsTable.tsx +++ b/src/app/Recordings/ArchivedRecordingsTable.tsx @@ -285,9 +285,7 @@ export const ArchivedRecordingsTable: React.FC = ( context.notificationChannel.messages(NotificationCategory.ArchivedRecordingCreated), context.notificationChannel.messages(NotificationCategory.ActiveRecordingSaved) ), - ]).subscribe((parts) => { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; } @@ -301,9 +299,7 @@ export const ArchivedRecordingsTable: React.FC = ( combineLatest([ propsTarget, context.notificationChannel.messages(NotificationCategory.ArchivedRecordingDeleted), - ]).subscribe((parts) => { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; } @@ -318,9 +314,7 @@ export const ArchivedRecordingsTable: React.FC = ( combineLatest([ propsTarget, context.notificationChannel.messages(NotificationCategory.RecordingMetadataUpdated), - ]).subscribe((parts) => { - const currentTarget = parts[0]; - const event = parts[1]; + ]).subscribe(([currentTarget, event]) => { if (currentTarget.connectUrl != event.message.target) { return; }