Browse Source
Merge pull request #799 from meriadec/fix-account-id-in-key
Prevent ticker animation when changing account page at lower level
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
3 deletions
-
src/components/AccountPage/AccountBalanceSummaryHeader.js
-
src/components/AccountPage/index.js
|
|
@ -28,7 +28,7 @@ type OwnProps = { |
|
|
|
totalBalance: number, |
|
|
|
sinceBalance: number, |
|
|
|
refBalance: number, |
|
|
|
accountId: string, // eslint-disable-line
|
|
|
|
accountId: string, |
|
|
|
} |
|
|
|
|
|
|
|
type Props = OwnProps & { |
|
|
@ -57,6 +57,7 @@ class AccountBalanceSummaryHeader extends PureComponent<Props> { |
|
|
|
render() { |
|
|
|
const { |
|
|
|
account, |
|
|
|
accountId, |
|
|
|
t, |
|
|
|
counterValue, |
|
|
|
selectedTimeRange, |
|
|
@ -76,6 +77,7 @@ class AccountBalanceSummaryHeader extends PureComponent<Props> { |
|
|
|
unit={account.unit} |
|
|
|
> |
|
|
|
<FormattedVal |
|
|
|
key={accountId} |
|
|
|
animateTicker |
|
|
|
disableRounding |
|
|
|
alwaysShowSign={false} |
|
|
|
|
|
@ -68,8 +68,7 @@ class AccountPage extends PureComponent<Props> { |
|
|
|
} |
|
|
|
|
|
|
|
return ( |
|
|
|
// `key` forces re-render account page when going an another account (skip animations)
|
|
|
|
<Box key={account.id}> |
|
|
|
<Box> |
|
|
|
<TrackPage |
|
|
|
category="Account" |
|
|
|
currency={account.currency.id} |
|
|
|