Decrease starting time window for free response graph
This commit is contained in:
parent
eb630dfa46
commit
04a8509212
|
@ -71,10 +71,10 @@ export const AnswersGraph = memo(function AnswersGraph(props: {
|
|||
const yTickValues = [0, 25, 50, 75, 100]
|
||||
|
||||
const numXTickValues = isLargeWidth ? 5 : 2
|
||||
const hoursAgo = latestTime.subtract(5, 'hours')
|
||||
const startDate = dayjs(contract.createdTime).isBefore(hoursAgo)
|
||||
const hourAgo = latestTime.subtract(1, 'hours')
|
||||
const startDate = dayjs(contract.createdTime).isBefore(hourAgo)
|
||||
? new Date(contract.createdTime)
|
||||
: hoursAgo.toDate()
|
||||
: hourAgo.toDate()
|
||||
|
||||
const multiYear = !dayjs(startDate).isSame(latestTime, 'year')
|
||||
const lessThanAWeek = dayjs(startDate).add(1, 'week').isAfter(latestTime)
|
||||
|
|
Loading…
Reference in New Issue
Block a user