Created modal to edit the loing URL behind a short URL

This commit is contained in:
Alejandro Celaya 2020-03-30 20:42:58 +02:00
parent ab2f311bb7
commit 7949e224e0
6 changed files with 129 additions and 3 deletions
src/short-urls/helpers

View file

@ -26,9 +26,7 @@ const dateOrUndefined = (shortUrl, dateName) => {
return date && moment(date);
};
const EditMetaModal = (
{ isOpen, toggle, shortUrl, shortUrlMeta, editShortUrlMeta, resetShortUrlMeta }
) => {
const EditMetaModal = ({ isOpen, toggle, shortUrl, shortUrlMeta, editShortUrlMeta, resetShortUrlMeta }) => {
const { saving, error } = shortUrlMeta;
const url = shortUrl && (shortUrl.shortUrl || '');
const [ validSince, setValidSince ] = useState(dateOrUndefined(shortUrl, 'validSince'));