Skip to content

Commit

Permalink
Fix race condition with metadata fallback text
Browse files Browse the repository at this point in the history
  • Loading branch information
davecreaser committed Nov 27, 2024
1 parent 20e2bf4 commit 9ec95d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const ActionNotification: FC<NotificationProps> = ({
return null;
}

return formatText({ id: 'action.title' }, titleValues);
return formatText({ id: 'action.title' }, titleValues, notification.id);
}, [action, colony, titleValues]);

Check warning on line 89 in src/components/common/Extensions/UserHub/partials/NotificationsTab/partials/Notification/Action/ActionNotification.tsx

View workflow job for this annotation

GitHub Actions / build

React Hook useMemo has a missing dependency: 'notification.id'. Either include it or remove the dependency array

const actionTitle =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ const ExpenditureNotification: FC<NotificationProps> = ({
return null;
}

return formatText({ id: 'action.title' }, actionTitleValues);
return formatText(
{ id: 'action.title' },
actionTitleValues,
notification.id,
);
}, [action, actionTitleValues, colony]);

return (
Expand Down

0 comments on commit 9ec95d8

Please sign in to comment.