mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-07-23 12:11:59 +00:00
Move more non-shared components to shlink-web-component
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import { DropdownBtn } from '../../../src/utils/DropdownBtn';
|
||||
import { useEffectExceptFirstTime } from '../../../src/utils/helpers/hooks';
|
||||
import { useEffectExceptFirstTime } from '../helpers/hooks';
|
||||
import { DateIntervalDropdownItems } from './DateIntervalDropdownItems';
|
||||
import { DateRangeRow } from './DateRangeRow';
|
||||
import type {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { format, formatISO, isBefore, isEqual, isWithinInterval, parse, parseISO as stdParseISO } from 'date-fns';
|
||||
import type { OptionalString } from '../../../../src/utils/utils';
|
||||
|
||||
export const STANDARD_DATE_FORMAT = 'yyyy-MM-dd';
|
||||
|
||||
@@ -13,7 +12,7 @@ export const now = () => new Date();
|
||||
|
||||
export const isDateObject = (date: DateOrString): date is Date => typeof date !== 'string';
|
||||
|
||||
const formatDateFromFormat = (date?: NullableDate, theFormat?: string): OptionalString => {
|
||||
const formatDateFromFormat = (date?: NullableDate, theFormat?: string): string | null | undefined => {
|
||||
if (!date || !isDateObject(date)) {
|
||||
return date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user