diff --git a/.changeset/rich-buttons-clean.md b/.changeset/rich-buttons-clean.md new file mode 100644 index 000000000000..08315c2b6290 --- /dev/null +++ b/.changeset/rich-buttons-clean.md @@ -0,0 +1,5 @@ +--- +"@pankod/refine-core": patch +--- + +Fix useList, useCustom and useCustomMutation hooks i18n issue in the error messages. diff --git a/packages/core/src/hooks/data/useCustom.ts b/packages/core/src/hooks/data/useCustom.ts index e40389d71680..205bd1e67bdf 100644 --- a/packages/core/src/hooks/data/useCustom.ts +++ b/packages/core/src/hooks/data/useCustom.ts @@ -143,7 +143,7 @@ export const useCustom = < handleNotification(notificationConfig, { key: `${method}-notification`, message: translate( - "common:notifications.error", + "notifications.error", { statusCode: err.statusCode }, `Error (status code: ${err.statusCode})`, ), diff --git a/packages/core/src/hooks/data/useCustomMutation.ts b/packages/core/src/hooks/data/useCustomMutation.ts index 886a7bac7a82..a5c37e1484ce 100644 --- a/packages/core/src/hooks/data/useCustomMutation.ts +++ b/packages/core/src/hooks/data/useCustomMutation.ts @@ -156,7 +156,7 @@ export const useCustomMutation = < handleNotification(notificationConfig, { key: `${method}-notification`, message: translate( - "common:notifications.error", + "notifications.error", { statusCode: err.statusCode }, `Error (status code: ${err.statusCode})`, ), diff --git a/packages/core/src/hooks/data/useList.ts b/packages/core/src/hooks/data/useList.ts index ecdfad771a3e..6284a1ce9605 100644 --- a/packages/core/src/hooks/data/useList.ts +++ b/packages/core/src/hooks/data/useList.ts @@ -167,7 +167,7 @@ export const useList = < handleNotification(notificationConfig, { key: `${resource}-useList-notification`, message: translate( - "common:notifications.error", + "notifications.error", { statusCode: err.statusCode }, `Error (status code: ${err.statusCode})`, ),