Merge branch 'main' into atlas3
This commit is contained in:
commit
e59e8b1025
|
@ -15,17 +15,17 @@ export const PortfolioValueSection = memo(
|
||||||
const lastPortfolioMetrics = last(portfolioHistory)
|
const lastPortfolioMetrics = last(portfolioHistory)
|
||||||
const [portfolioPeriod, setPortfolioPeriod] = useState<Period>('allTime')
|
const [portfolioPeriod, setPortfolioPeriod] = useState<Period>('allTime')
|
||||||
|
|
||||||
// PATCH: If portfolio history started on June 1st, then we label it as "Since June"
|
|
||||||
// instead of "All time"
|
|
||||||
const allTimeLabel =
|
|
||||||
portfolioHistory[0].timestamp < Date.parse('2022-06-20T00:00:00.000Z')
|
|
||||||
? 'Since June'
|
|
||||||
: 'All time'
|
|
||||||
|
|
||||||
if (portfolioHistory.length === 0 || !lastPortfolioMetrics) {
|
if (portfolioHistory.length === 0 || !lastPortfolioMetrics) {
|
||||||
return <></>
|
return <></>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PATCH: If portfolio history started on June 1st, then we label it as "Since June"
|
||||||
|
// instead of "All time"
|
||||||
|
const allTimeLabel =
|
||||||
|
lastPortfolioMetrics.timestamp < Date.parse('2022-06-20T00:00:00.000Z')
|
||||||
|
? 'Since June'
|
||||||
|
: 'All time'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Row className="gap-8">
|
<Row className="gap-8">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user