import { ResponsiveLine } from '@nivo/line' import dayjs from 'dayjs' import _ from 'lodash' import { useWindowSize } from '../../hooks/use-window-size' export function DailyCountChart(props: { startDate: number dailyCounts: number[] small?: boolean }) { const { dailyCounts, startDate, small } = props const { width } = useWindowSize() const dates = dailyCounts.map((_, i) => dayjs(startDate).add(i, 'day').toDate() ) const points = _.zip(dates, dailyCounts).map(([date, betCount]) => ({ x: date, y: betCount, })) const data = [{ id: 'Count', data: points, color: '#11b981' }] return (