Browse Source
Merge pull request #926 from meriadec/chart-tooltip-date-format
Correct date format for chart Tooltip
master
Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
src/components/BalanceSummary/index.js
-
src/components/base/Chart/Tooltip.js
|
|
@ -1,6 +1,7 @@ |
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React, { Fragment } from 'react' |
|
|
|
import moment from 'moment' |
|
|
|
import { formatShort } from '@ledgerhq/live-common/lib/helpers/currencies' |
|
|
|
import type { Currency, Account } from '@ledgerhq/live-common/lib/types' |
|
|
|
|
|
|
@ -90,7 +91,7 @@ const BalanceSummary = ({ |
|
|
|
val={d.value} |
|
|
|
/> |
|
|
|
<Box ff="Open Sans|Regular" color="grey" fontSize={3} mt={2}> |
|
|
|
{d.date.toISOString().substr(0, 10)} |
|
|
|
{moment(d.date).format('L')} |
|
|
|
</Box> |
|
|
|
</Fragment> |
|
|
|
) |
|
|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React, { Fragment } from 'react' |
|
|
|
import moment from 'moment' |
|
|
|
import styled from 'styled-components' |
|
|
|
|
|
|
|
import type { Unit, Currency } from '@ledgerhq/live-common/lib/types' |
|
|
@ -68,7 +69,7 @@ const Tooltip = ({ |
|
|
|
/> |
|
|
|
)} |
|
|
|
<Box ff="Open Sans|Regular" color="grey" fontSize={3} mt={2}> |
|
|
|
{item.date.toISOString().substr(0, 10)} |
|
|
|
{moment(item.date).format('L')} |
|
|
|
</Box> |
|
|
|
</Fragment> |
|
|
|
)} |
|
|
|