mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 18:21:57 +01:00
Merge pull request #2450 from BlueWallet/limpbrains-dayjs-local
FIX: use dayjs localizedFormat plugin to render tx time
This commit is contained in:
commit
94bd1c9c8a
@ -2,6 +2,7 @@ import Localization from 'react-localization';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import dayjs from 'dayjs';
|
||||
import relativeTime from 'dayjs/plugin/relativeTime';
|
||||
import localizedFormat from 'dayjs/plugin/localizedFormat';
|
||||
import * as RNLocalize from 'react-native-localize';
|
||||
import BigNumber from 'bignumber.js';
|
||||
|
||||
@ -11,6 +12,7 @@ import { AvailableLanguages } from './languages';
|
||||
const currency = require('../blue_modules/currency');
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
dayjs.extend(localizedFormat)
|
||||
|
||||
// first-time loading sequence
|
||||
|
||||
|
@ -203,7 +203,7 @@ const TransactionsDetails = () => {
|
||||
{tx.received && (
|
||||
<>
|
||||
<BlueText style={[styles.rowCaption, stylesHooks.rowCaption]}>{loc.transactions.details_received}</BlueText>
|
||||
<BlueText style={styles.rowValue}>{dayjs(tx.received).format('MM/DD/YYYY h:mm A')}</BlueText>
|
||||
<BlueText style={styles.rowValue}>{dayjs(tx.received).format('LLL')}</BlueText>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user