Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f5196c0

Browse files
fix(site): fix insights picker and disable animation (coder#11391)
1 parent f80a1cf commit f5196c0

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

site/src/components/ActiveUserChart/ActiveUserChart.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export const ActiveUserChart: FC<ActiveUserChartProps> = ({
6262

6363
const options: ChartOptions<"line"> = {
6464
responsive: true,
65+
animation: false,
6566
plugins: {
6667
annotation: {
6768
annotations: [

site/src/pages/TemplatePage/TemplateInsightsPage/DateRange.tsx

+2-6
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,18 @@ export const DateRange: FC<DateRangeProps> = ({ value, onChange }) => {
4949
key: "selection",
5050
},
5151
]);
52-
const currentRange = {
53-
startDate: ranges[0].startDate as Date,
54-
endDate: ranges[0].endDate as Date,
55-
};
5652

5753
return (
5854
<Popover>
5955
{(popover) => (
6056
<>
6157
<PopoverTrigger>
6258
<Button>
63-
<span>{format(currentRange.startDate, "MMM d, Y")}</span>
59+
<span>{format(value.startDate, "MMM d, Y")}</span>
6460
<ArrowRightAltOutlined
6561
css={{ width: 16, height: 16, marginLeft: 8, marginRight: 8 }}
6662
/>
67-
<span>{format(currentRange.endDate, "MMM d, Y")}</span>
63+
<span>{format(value.endDate, "MMM d, Y")}</span>
6864
</Button>
6965
</PopoverTrigger>
7066
<PopoverContent>

0 commit comments

Comments
 (0)