Merge remote-tracking branch 'upstream/master' into fix-font-family

This commit is contained in:
Minseo Lee 2024-08-29 14:49:32 +09:00
commit 01fc293d3f
19 changed files with 305 additions and 321 deletions

View file

@ -1,9 +1,8 @@
import { useMemo } from 'react';
import { useTheme } from 'components/hooks';
import Chart, { ChartProps } from 'components/charts/Chart';
import { renderNumberLabels } from 'lib/charts';
import { useState } from 'react';
import BarChartTooltip from 'components/charts/BarChartTooltip';
import Chart, { ChartProps } from 'components/charts/Chart';
import { useTheme } from 'components/hooks';
import { renderNumberLabels } from 'lib/charts';
import { useMemo, useState } from 'react';
export interface BarChartProps extends ChartProps {
unit: string;
@ -36,7 +35,7 @@ export function BarChart(props: BarChartProps) {
x: {
type: XAxisType,
stacked: true,
min: minDate,
min: minDate && new Date(minDate).getSeconds() === 0 ? minDate : '',
max: maxDate,
time: {
unit,

View file

@ -15,6 +15,7 @@ export interface DataTableProps {
searchDelay?: number;
allowSearch?: boolean;
allowPaging?: boolean;
autoFocus?: boolean;
renderEmpty?: () => ReactNode;
children: ReactNode | ((data: any) => ReactNode);
}
@ -24,6 +25,7 @@ export function DataTable({
searchDelay = 600,
allowSearch = true,
allowPaging = true,
autoFocus = true,
renderEmpty,
children,
}: DataTableProps) {
@ -57,7 +59,7 @@ export function DataTable({
value={query}
onSearch={handleSearch}
delay={searchDelay || DEFAULT_SEARCH_DELAY}
autoFocus={true}
autoFocus={autoFocus}
placeholder={formatMessage(labels.search)}
/>
)}

View file

@ -47,6 +47,8 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
return (
<BarChart
minDate={startDate.toISOString()}
maxDate={endDate.toISOString()}
className={className}
data={chartData}
unit={unit}