diff --git a/src/components/PeriodPicker.tsx b/src/components/PeriodPicker.tsx index 615caa8..3442d0e 100644 --- a/src/components/PeriodPicker.tsx +++ b/src/components/PeriodPicker.tsx @@ -1,25 +1,25 @@ import { Select } from 'antd' -export const defaultPeriod = '600' +export const defaultPeriod = 600 const timePeriodCollection = [ - { value: '60', label: '1 минута' }, - { value: '300', label: '5 минут' }, - { value: '600', label: '10 минут' }, - { value: '1800', label: '30 минут' }, - { value: '3600', label: '1 час' }, - { value: '21600', label: '6 часов' }, - { value: '43200', label: '12 часов' }, - { value: '86400', label: '24 часа' } + { value: 60, label: '1 минута' }, + { value: 300, label: '5 минут' }, + { value: 600, label: '10 минут' }, + { value: 1800, label: '30 минут' }, + { value: 3600, label: '1 час' }, + { value: 21600, label: '6 часов' }, + { value: 43200, label: '12 часов' }, + { value: 86400, label: '24 часа' } ] -interface PeriodPickerProps { - defaultValue?: string - onChange?: (value: string, option: any) => void +type PeriodPickerProps = { + defaultValue?: number + onChange?: (value: number) => void } export const PeriodPicker = ({ defaultValue = defaultPeriod, onChange }: PeriodPickerProps) => ( - onChange?.(Number(value))}> {timePeriodCollection.map(period => ( {period.label}