diff --git a/public/index.html b/public/index.html index e13f0465..0f50c941 100644 --- a/public/index.html +++ b/public/index.html @@ -11,12 +11,12 @@ --> - //FavIcon itself + - //Apple Touch + @@ -44,7 +44,7 @@ - //Normal + @@ -72,7 +72,7 @@ - //MS + diff --git a/src/short-urls/SearchBar.js b/src/short-urls/SearchBar.js index c6537535..f831b783 100644 --- a/src/short-urls/SearchBar.js +++ b/src/short-urls/SearchBar.js @@ -1,10 +1,13 @@ import { faTags as tagsIcon } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React from 'react'; -import { isEmpty } from 'ramda'; +import { isEmpty, pipe } from 'ramda'; import PropTypes from 'prop-types'; +import moment from 'moment'; import SearchField from '../utils/SearchField'; import Tag from '../tags/helpers/Tag'; +import DateRangeRow from '../utils/DateRangeRow'; +import { formatDate } from '../utils/utils'; import { shortUrlsListParamsType } from './reducers/shortUrlsListParams'; import './SearchBar.scss'; @@ -13,19 +16,35 @@ const propTypes = { shortUrlsListParams: shortUrlsListParamsType, }; +const dateOrUndefined = (date) => date ? moment(date) : undefined; + const SearchBar = (colorGenerator) => { const SearchBar = ({ listShortUrls, shortUrlsListParams }) => { const selectedTags = shortUrlsListParams.tags || []; + const setDate = (dateName) => pipe( + formatDate(), + (date) => listShortUrls({ ...shortUrlsListParams, [dateName]: date }) + ); return ( -