mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Removed FormattedMessage usage.
This commit is contained in:
parent
84193a4ec5
commit
f242835fc2
13 changed files with 132 additions and 70 deletions
|
|
@ -11,7 +11,7 @@ export function ReportDeleteButton({
|
|||
reportName: string;
|
||||
onDelete?: () => void;
|
||||
}) {
|
||||
const { formatMessage, labels, messages, FormattedMessage } = useMessages();
|
||||
const { formatMessage, labels, messages } = useMessages();
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate, isPending, error } = useMutation({
|
||||
mutationFn: reportId => del(`/reports/${reportId}`),
|
||||
|
|
@ -39,12 +39,7 @@ export function ReportDeleteButton({
|
|||
<Modal title={formatMessage(labels.deleteReport)}>
|
||||
{(close: () => void) => (
|
||||
<ConfirmationForm
|
||||
message={
|
||||
<FormattedMessage
|
||||
{...messages.confirmDelete}
|
||||
values={{ target: <b>{reportName}</b> }}
|
||||
/>
|
||||
}
|
||||
message={formatMessage(messages.confirmDelete, { target: <b>{reportName}</b> })}
|
||||
isLoading={isPending}
|
||||
error={error}
|
||||
onConfirm={handleConfirm.bind(null, close)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue