Skip to content

Commit

Permalink
fix: remove add a point in chart tx
Browse files Browse the repository at this point in the history
  • Loading branch information
Tien Nam Dao committed Feb 21, 2023
1 parent 35ecbc9 commit cb5ade9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions views/homepage/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
} from 'chart.js'
import 'chartjs-adapter-dayjs'
import Spinner from 'components/Spinner'
import dayjs from 'dayjs'
import humps from 'humps'
import { useRouter } from 'next/router'
import numeral from 'numeral'
Expand Down Expand Up @@ -50,11 +49,6 @@ function getPriceData(marketHistoryData) {
y: closingPrice
}))

// Because of data return not include today. Add this.
const prevDay = dayjs(data[0].x)
let curDay = prevDay.add(1, 'd')
data.unshift({ x: curDay, y: null })

setDataToLocalStorage('priceData', data)
return data
}
Expand Down

0 comments on commit cb5ade9

Please sign in to comment.