From 4d8e1e77d6954bfc44548acec63e796b9450ff77 Mon Sep 17 00:00:00 2001 From: Bryan Elliott Date: Sun, 22 Dec 2024 13:06:32 -0500 Subject: [PATCH] Refactor 'status' destructure from redBubbleAlerts data. --- .../use-get-readable-failed-backup-reason.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/packages/my-jetpack/_inc/hooks/use-notification-watcher/use-get-readable-failed-backup-reason.tsx b/projects/packages/my-jetpack/_inc/hooks/use-notification-watcher/use-get-readable-failed-backup-reason.tsx index 23e1f2fb7b51f..efc837b569697 100644 --- a/projects/packages/my-jetpack/_inc/hooks/use-notification-watcher/use-get-readable-failed-backup-reason.tsx +++ b/projects/packages/my-jetpack/_inc/hooks/use-notification-watcher/use-get-readable-failed-backup-reason.tsx @@ -15,7 +15,9 @@ export type ReasonContent = { export function useGetReadableFailedBackupReason(): ReasonContent { const { backup_failure: backupFailure } = getMyJetpackWindowInitialState( 'redBubbleAlerts' ) || {}; - const { status } = backupFailure || {}; + const { + data: { status }, + } = backupFailure || { data: {} }; const reasonContent = useMemo( () => { switch ( status ) {