Skip to content

Commit

Permalink
chore: replace localize component with localize function (#16457)
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-deriv authored and farabi-deriv committed Aug 13, 2024
1 parent 6af2bc1 commit 36e3a69
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useSubscription } from '@deriv/api-v2';
import { Localize } from '@deriv-com/translations';
import { Localize, localize } from '@deriv-com/translations';

type TTransaction = NonNullable<
NonNullable<ReturnType<typeof useSubscription<'cashier_payments'>>['data']>['cashier_payments']
Expand Down Expand Up @@ -101,10 +101,10 @@ export const getFormattedConfirmations = (
) => {
switch (statusCode) {
case 'CONFIRMED':
return <Localize i18n_default_text='Confirmed' />;
return localize('Confirmed');
case 'ERROR':
return <Localize i18n_default_text='NA' />;
return localize('NA');
default:
return confirmations?.toString() ?? <Localize i18n_default_text='Pending' />;
return confirmations?.toString() ?? localize('Pending');
}
};

0 comments on commit 36e3a69

Please sign in to comment.