Skip to content

Commit

Permalink
chore(recordings): use array destructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuan Vo committed Jan 12, 2023
1 parent 71d8313 commit def895d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 21 deletions.
16 changes: 4 additions & 12 deletions src/app/Recordings/ActiveRecordingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ export const ActiveRecordingsTable: React.FunctionComponent<ActiveRecordingsTabl
context.notificationChannel.messages(NotificationCategory.ActiveRecordingCreated),
context.notificationChannel.messages(NotificationCategory.SnapshotCreated)
),
]).subscribe((parts) => {
const currentTarget = parts[0];
const event = parts[1];
]).subscribe(([currentTarget, event]) => {
if (currentTarget.connectUrl != event.message.target) {
return;
}
Expand All @@ -225,9 +223,7 @@ export const ActiveRecordingsTable: React.FunctionComponent<ActiveRecordingsTabl
context.notificationChannel.messages(NotificationCategory.ActiveRecordingDeleted),
context.notificationChannel.messages(NotificationCategory.SnapshotDeleted)
),
]).subscribe((parts) => {
const currentTarget = parts[0];
const event = parts[1];
]).subscribe(([currentTarget, event]) => {
if (currentTarget.connectUrl != event.message.target) {
return;
}
Expand All @@ -243,9 +239,7 @@ export const ActiveRecordingsTable: React.FunctionComponent<ActiveRecordingsTabl
combineLatest([
context.target.target(),
context.notificationChannel.messages(NotificationCategory.ActiveRecordingStopped),
]).subscribe((parts) => {
const currentTarget = parts[0];
const event = parts[1];
]).subscribe(([currentTarget, event]) => {
if (currentTarget.connectUrl != event.message.target) {
return;
}
Expand Down Expand Up @@ -276,9 +270,7 @@ export const ActiveRecordingsTable: React.FunctionComponent<ActiveRecordingsTabl
combineLatest([
context.target.target(),
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;
}
Expand Down
12 changes: 3 additions & 9 deletions src/app/Recordings/ArchivedRecordingsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ export const ArchivedRecordingsTable: React.FC<ArchivedRecordingsTableProps> = (
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;
}
Expand All @@ -301,9 +299,7 @@ export const ArchivedRecordingsTable: React.FC<ArchivedRecordingsTableProps> = (
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;
}
Expand All @@ -318,9 +314,7 @@ export const ArchivedRecordingsTable: React.FC<ArchivedRecordingsTableProps> = (
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;
}
Expand Down

0 comments on commit def895d

Please sign in to comment.