mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-24 04:31:52 +00:00
Renamed file containing date range and date interval utils
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import { FC } from 'react';
|
||||
import { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from './types';
|
||||
import { DATE_INTERVALS, DateInterval, rangeOrIntervalToString } from '../helpers/dateIntervals';
|
||||
|
||||
export interface DateIntervalDropdownProps {
|
||||
active?: DateInterval;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FC } from 'react';
|
||||
import { DropdownBtn } from '../DropdownBtn';
|
||||
import { rangeOrIntervalToString } from './types';
|
||||
import { rangeOrIntervalToString } from '../helpers/dateIntervals';
|
||||
import { DateIntervalDropdownItems, DateIntervalDropdownProps } from './DateIntervalDropdownItems';
|
||||
|
||||
export const DateIntervalSelector: FC<DateIntervalDropdownProps> = ({ onChange, active, allText }) => (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { endOfDay } from 'date-fns';
|
||||
import { DateInput } from './DateInput';
|
||||
import { DateRange } from './types';
|
||||
import { DateRange } from '../helpers/dateIntervals';
|
||||
|
||||
interface DateRangeRowProps extends DateRange {
|
||||
onStartDateChange: (date: Date | null) => void;
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
intervalToDateRange,
|
||||
rangeIsInterval,
|
||||
dateRangeIsEmpty,
|
||||
} from './types';
|
||||
} from '../helpers/dateIntervals';
|
||||
import { DateRangeRow } from './DateRangeRow';
|
||||
import { DateIntervalDropdownItems } from './DateIntervalDropdownItems';
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { subDays, startOfDay, endOfDay } from 'date-fns';
|
||||
import { cond, filter, isEmpty, T } from 'ramda';
|
||||
import { dateOrNull, DateOrString, formatInternational, isBeforeOrEqual, parseISO } from '../../helpers/date';
|
||||
|
||||
// TODO Rename this to src/utils/helpers/dateIntervals.ts
|
||||
import { dateOrNull, DateOrString, formatInternational, isBeforeOrEqual, parseISO } from './date';
|
||||
|
||||
export interface DateRange {
|
||||
startDate?: Date | null;
|
||||
Reference in New Issue
Block a user