Skip to content

Commit

Permalink
Refactor 'status' destructure from redBubbleAlerts data.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottprogrammer committed Dec 22, 2024
1 parent 4b584fe commit 4d8e1e7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 4d8e1e7

Please sign in to comment.