mirror of
https://github.com/umami-software/umami.git
synced 2026-02-19 03:55:37 +01:00
Get localized error messages.
This commit is contained in:
parent
baba06c692
commit
fc01ee9f56
32 changed files with 90 additions and 85 deletions
|
|
@ -12,7 +12,7 @@ export function TeamDeleteForm({
|
|||
onSave?: () => void;
|
||||
onClose?: () => void;
|
||||
}) {
|
||||
const { labels, formatMessage } = useMessages();
|
||||
const { labels, formatMessage, getErrorMessage } = useMessages();
|
||||
const { mutate, error, isPending, touch } = useDeleteQuery(`/teams/${teamId}`);
|
||||
|
||||
const handleConfirm = async () => {
|
||||
|
|
@ -31,7 +31,7 @@ export function TeamDeleteForm({
|
|||
onConfirm={handleConfirm}
|
||||
onClose={onClose}
|
||||
isLoading={isPending}
|
||||
error={error}
|
||||
error={getErrorMessage(error)}
|
||||
buttonLabel={formatMessage(labels.delete)}
|
||||
buttonVariant="danger"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue