mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 09:25:46 +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();
|
toggleWarningCancel();
|
||||||
},
|
},
|
||||||
color: 'cancel',
|
color: 'cancel',
|
||||||
label: formatMessageRef.current({
|
label: formatMessage({
|
||||||
id: `${pluginId}.containers.Edit.reset`,
|
id: `${pluginId}.containers.Edit.reset`,
|
||||||
}),
|
}),
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -82,7 +82,7 @@ const Header = () => {
|
|||||||
{
|
{
|
||||||
disabled: !didChangeData,
|
disabled: !didChangeData,
|
||||||
color: 'success',
|
color: 'success',
|
||||||
label: formatMessageRef.current({
|
label: formatMessage({
|
||||||
id: `${pluginId}.containers.Edit.submit`,
|
id: `${pluginId}.containers.Edit.submit`,
|
||||||
}),
|
}),
|
||||||
isLoading: isSubmitting,
|
isLoading: isSubmitting,
|
||||||
@ -97,7 +97,7 @@ const Header = () => {
|
|||||||
|
|
||||||
if (!isCreatingEntry && canDelete) {
|
if (!isCreatingEntry && canDelete) {
|
||||||
headerActions.unshift({
|
headerActions.unshift({
|
||||||
label: formatMessageRef.current({
|
label: formatMessage({
|
||||||
id: 'app.utils.delete',
|
id: 'app.utils.delete',
|
||||||
}),
|
}),
|
||||||
color: 'delete',
|
color: 'delete',
|
||||||
@ -114,7 +114,15 @@ const Header = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return headerActions;
|
return headerActions;
|
||||||
}, [canCreate, canDelete, canUpdate, didChangeData, isCreatingEntry, isSubmitting]);
|
}, [
|
||||||
|
canCreate,
|
||||||
|
canDelete,
|
||||||
|
canUpdate,
|
||||||
|
didChangeData,
|
||||||
|
isCreatingEntry,
|
||||||
|
isSubmitting,
|
||||||
|
formatMessage,
|
||||||
|
]);
|
||||||
|
|
||||||
const headerProps = useMemo(() => {
|
const headerProps = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
|
@ -463,7 +463,7 @@ function ListView({
|
|||||||
];
|
];
|
||||||
},
|
},
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
[label, pathname, search, canCreate]
|
[label, pathname, search, canCreate, formatMessage]
|
||||||
);
|
);
|
||||||
|
|
||||||
const headerProps = useMemo(() => {
|
const headerProps = useMemo(() => {
|
||||||
@ -487,7 +487,7 @@ function ListView({
|
|||||||
};
|
};
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [count, headerAction, label, canRead]);
|
}, [count, headerAction, label, canRead, formatMessage]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user