mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 00:39:49 +00:00
Fix trads refresh
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
f2d449a965
commit
b62cb702d1
@ -69,7 +69,7 @@ const Header = () => {
|
||||
toggleWarningCancel();
|
||||
},
|
||||
color: 'cancel',
|
||||
label: formatMessageRef.current({
|
||||
label: formatMessage({
|
||||
id: `${pluginId}.containers.Edit.reset`,
|
||||
}),
|
||||
type: 'button',
|
||||
@ -82,7 +82,7 @@ const Header = () => {
|
||||
{
|
||||
disabled: !didChangeData,
|
||||
color: 'success',
|
||||
label: formatMessageRef.current({
|
||||
label: formatMessage({
|
||||
id: `${pluginId}.containers.Edit.submit`,
|
||||
}),
|
||||
isLoading: isSubmitting,
|
||||
@ -97,7 +97,7 @@ const Header = () => {
|
||||
|
||||
if (!isCreatingEntry && canDelete) {
|
||||
headerActions.unshift({
|
||||
label: formatMessageRef.current({
|
||||
label: formatMessage({
|
||||
id: 'app.utils.delete',
|
||||
}),
|
||||
color: 'delete',
|
||||
@ -114,7 +114,15 @@ const Header = () => {
|
||||
}
|
||||
|
||||
return headerActions;
|
||||
}, [canCreate, canDelete, canUpdate, didChangeData, isCreatingEntry, isSubmitting]);
|
||||
}, [
|
||||
canCreate,
|
||||
canDelete,
|
||||
canUpdate,
|
||||
didChangeData,
|
||||
isCreatingEntry,
|
||||
isSubmitting,
|
||||
formatMessage,
|
||||
]);
|
||||
|
||||
const headerProps = useMemo(() => {
|
||||
return {
|
||||
|
@ -463,7 +463,7 @@ function ListView({
|
||||
];
|
||||
},
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[label, pathname, search, canCreate]
|
||||
[label, pathname, search, canCreate, formatMessage]
|
||||
);
|
||||
|
||||
const headerProps = useMemo(() => {
|
||||
@ -487,7 +487,7 @@ function ListView({
|
||||
};
|
||||
/* eslint-enable indent */
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [count, headerAction, label, canRead]);
|
||||
}, [count, headerAction, label, canRead, formatMessage]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user