mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
WIP: Arabic localization.|
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage as T, useIntl } from 'react-intl';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Intent, Alert } from '@blueprintjs/core';
|
||||
|
||||
import { useCloseReceipt } from 'hooks/query';
|
||||
@@ -23,7 +24,7 @@ function ReceiptCloseAlert({
|
||||
// #withAlertActions
|
||||
closeAlert,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const { mutateAsync: closeReceiptMutate, isLoading } = useCloseReceipt();
|
||||
|
||||
// handle cancel delete alert.
|
||||
@@ -36,9 +37,7 @@ function ReceiptCloseAlert({
|
||||
closeReceiptMutate(receiptId)
|
||||
.then(() => {
|
||||
AppToaster.show({
|
||||
message: formatMessage({
|
||||
id: 'the_receipt_has_been_closed_successfully',
|
||||
}),
|
||||
message: intl.get('the_receipt_has_been_closed_successfully'),
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import React from 'react';
|
||||
import {
|
||||
FormattedMessage as T,
|
||||
FormattedHTMLMessage,
|
||||
useIntl,
|
||||
} from 'react-intl';
|
||||
import intl from 'react-intl-universal';
|
||||
import { FormattedMessage as T, FormattedHTMLMessage } from 'components';
|
||||
import { Intent, Alert } from '@blueprintjs/core';
|
||||
import { queryCache } from 'react-query';
|
||||
|
||||
@@ -28,7 +25,7 @@ function NameDeleteAlert({
|
||||
// #withAlertActions
|
||||
closeAlert,
|
||||
}) {
|
||||
const { formatMessage } = useIntl();
|
||||
|
||||
const {
|
||||
mutateAsync: deleteReceiptMutate,
|
||||
isLoading
|
||||
@@ -44,9 +41,7 @@ function NameDeleteAlert({
|
||||
deleteReceiptMutate(receiptId)
|
||||
.then(() => {
|
||||
AppToaster.show({
|
||||
message: formatMessage({
|
||||
id: 'the_receipt_has_been_deleted_successfully',
|
||||
}),
|
||||
message: intl.get('the_receipt_has_been_deleted_successfully'),
|
||||
intent: Intent.SUCCESS,
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user