Label "Since June" for users who had an account prior to 2022-06-20 (#659)
This commit is contained in:
parent
781de79b97
commit
47a27bf3fe
|
@ -15,6 +15,13 @@ export const PortfolioValueSection = memo(
|
|||
const lastPortfolioMetrics = last(portfolioHistory)
|
||||
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) {
|
||||
return <></>
|
||||
}
|
||||
|
@ -39,7 +46,7 @@ export const PortfolioValueSection = memo(
|
|||
setPortfolioPeriod(e.target.value as Period)
|
||||
}}
|
||||
>
|
||||
<option value="allTime">All time</option>
|
||||
<option value="allTime">{allTimeLabel}</option>
|
||||
<option value="weekly">7 days</option>
|
||||
<option value="daily">24 hours</option>
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue
Block a user