From c90cd46095392326cf34c90dc1b5def414cf5f5e Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Wed, 15 Jan 2020 18:16:12 +0100 Subject: [PATCH] Removed old ExternalLink component in favor of external one --- src/short-urls/helpers/EditTagsModal.js | 2 +- src/short-urls/helpers/PreviewModal.js | 2 +- src/short-urls/helpers/QrCodeModal.js | 2 +- src/short-urls/helpers/ShortUrlsRow.js | 2 +- src/utils/ExternalLink.js | 3 --- src/visits/VisitsHeader.js | 2 +- test/short-urls/helpers/PreviewModal.test.js | 2 +- test/short-urls/helpers/QrCodeModal.test.js | 2 +- test/short-urls/helpers/ShortUrlsRow.test.js | 2 +- test/visits/VisitsHeader.test.js | 2 +- 10 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 src/utils/ExternalLink.js diff --git a/src/short-urls/helpers/EditTagsModal.js b/src/short-urls/helpers/EditTagsModal.js index f5d34dd2..261b12e3 100644 --- a/src/short-urls/helpers/EditTagsModal.js +++ b/src/short-urls/helpers/EditTagsModal.js @@ -1,7 +1,7 @@ import React from 'react'; import { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap'; import PropTypes from 'prop-types'; -import ExternalLink from '../../utils/ExternalLink'; +import { ExternalLink } from 'react-external-link'; import { shortUrlTagsType } from '../reducers/shortUrlTags'; import { shortUrlType } from '../reducers/shortUrlsList'; diff --git a/src/short-urls/helpers/PreviewModal.js b/src/short-urls/helpers/PreviewModal.js index 8496be7a..9570ec75 100644 --- a/src/short-urls/helpers/PreviewModal.js +++ b/src/short-urls/helpers/PreviewModal.js @@ -1,8 +1,8 @@ import React from 'react'; import { Modal, ModalBody, ModalHeader } from 'reactstrap'; import PropTypes from 'prop-types'; +import { ExternalLink } from 'react-external-link'; import './PreviewModal.scss'; -import ExternalLink from '../../utils/ExternalLink'; const propTypes = { url: PropTypes.string, diff --git a/src/short-urls/helpers/QrCodeModal.js b/src/short-urls/helpers/QrCodeModal.js index 3a8cd43f..dcc8b323 100644 --- a/src/short-urls/helpers/QrCodeModal.js +++ b/src/short-urls/helpers/QrCodeModal.js @@ -1,8 +1,8 @@ import React from 'react'; import { Modal, ModalBody, ModalHeader } from 'reactstrap'; import PropTypes from 'prop-types'; +import { ExternalLink } from 'react-external-link'; import './QrCodeModal.scss'; -import ExternalLink from '../../utils/ExternalLink'; const propTypes = { url: PropTypes.string, diff --git a/src/short-urls/helpers/ShortUrlsRow.js b/src/short-urls/helpers/ShortUrlsRow.js index 10585db7..55aadfa1 100644 --- a/src/short-urls/helpers/ShortUrlsRow.js +++ b/src/short-urls/helpers/ShortUrlsRow.js @@ -2,9 +2,9 @@ import { isEmpty } from 'ramda'; import React from 'react'; import Moment from 'react-moment'; import PropTypes from 'prop-types'; +import { ExternalLink } from 'react-external-link'; import { shortUrlsListParamsType } from '../reducers/shortUrlsListParams'; import { serverType } from '../../servers/prop-types'; -import ExternalLink from '../../utils/ExternalLink'; import { shortUrlType } from '../reducers/shortUrlsList'; import Tag from '../../tags/helpers/Tag'; import ShortUrlVisitsCount from './ShortUrlVisitsCount'; diff --git a/src/utils/ExternalLink.js b/src/utils/ExternalLink.js deleted file mode 100644 index e11ad7c4..00000000 --- a/src/utils/ExternalLink.js +++ /dev/null @@ -1,3 +0,0 @@ -import { ExternalLink } from 'react-external-link'; - -export default ExternalLink; diff --git a/src/visits/VisitsHeader.js b/src/visits/VisitsHeader.js index d631eb31..b4180572 100644 --- a/src/visits/VisitsHeader.js +++ b/src/visits/VisitsHeader.js @@ -1,7 +1,7 @@ import { Card, UncontrolledTooltip } from 'reactstrap'; import Moment from 'react-moment'; import React from 'react'; -import ExternalLink from '../utils/ExternalLink'; +import { ExternalLink } from 'react-external-link'; import ShortUrlVisitsCount from '../short-urls/helpers/ShortUrlVisitsCount'; import { shortUrlDetailType } from './reducers/shortUrlDetail'; import './VisitsHeader.scss'; diff --git a/test/short-urls/helpers/PreviewModal.test.js b/test/short-urls/helpers/PreviewModal.test.js index 694eb0f7..ee7356be 100644 --- a/test/short-urls/helpers/PreviewModal.test.js +++ b/test/short-urls/helpers/PreviewModal.test.js @@ -1,7 +1,7 @@ import React from 'react'; import { shallow } from 'enzyme'; +import { ExternalLink } from 'react-external-link'; import PreviewModal from '../../../src/short-urls/helpers/PreviewModal'; -import ExternalLink from '../../../src/utils/ExternalLink'; describe('', () => { let wrapper; diff --git a/test/short-urls/helpers/QrCodeModal.test.js b/test/short-urls/helpers/QrCodeModal.test.js index 5999cf51..44ccf2a3 100644 --- a/test/short-urls/helpers/QrCodeModal.test.js +++ b/test/short-urls/helpers/QrCodeModal.test.js @@ -1,7 +1,7 @@ import React from 'react'; import { shallow } from 'enzyme'; +import { ExternalLink } from 'react-external-link'; import QrCodeModal from '../../../src/short-urls/helpers/QrCodeModal'; -import ExternalLink from '../../../src/utils/ExternalLink'; describe('', () => { let wrapper; diff --git a/test/short-urls/helpers/ShortUrlsRow.test.js b/test/short-urls/helpers/ShortUrlsRow.test.js index 5be8718a..cb6d9a77 100644 --- a/test/short-urls/helpers/ShortUrlsRow.test.js +++ b/test/short-urls/helpers/ShortUrlsRow.test.js @@ -3,8 +3,8 @@ import { shallow } from 'enzyme'; import moment from 'moment'; import Moment from 'react-moment'; import { assoc, toString } from 'ramda'; +import { ExternalLink } from 'react-external-link'; import createShortUrlsRow from '../../../src/short-urls/helpers/ShortUrlsRow'; -import ExternalLink from '../../../src/utils/ExternalLink'; import Tag from '../../../src/tags/helpers/Tag'; describe('', () => { diff --git a/test/visits/VisitsHeader.test.js b/test/visits/VisitsHeader.test.js index 84b287d1..8b35b93a 100644 --- a/test/visits/VisitsHeader.test.js +++ b/test/visits/VisitsHeader.test.js @@ -1,8 +1,8 @@ import React from 'react'; import { shallow } from 'enzyme'; import Moment from 'react-moment'; +import { ExternalLink } from 'react-external-link'; import VisitsHeader from '../../src/visits/VisitsHeader'; -import ExternalLink from '../../src/utils/ExternalLink'; describe('', () => { let wrapper;