From cccf57a35adc9730b811271dfa3735d5153eeeae Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Thu, 1 Nov 2018 09:05:20 +0100 Subject: [PATCH] Moved DateInput from common to utils --- src/short-urls/CreateShortUrl.js | 2 +- src/{common => utils}/DateInput.js | 6 +++--- src/{common => utils}/DateInput.scss | 4 ++-- src/visits/ShortUrlVisits.js | 2 +- test/{common => utils}/DateInput.test.js | 2 +- test/visits/ShortUrlVisits.test.js | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename src/{common => utils}/DateInput.js (100%) rename src/{common => utils}/DateInput.scss (88%) rename test/{common => utils}/DateInput.test.js (95%) diff --git a/src/short-urls/CreateShortUrl.js b/src/short-urls/CreateShortUrl.js index e3c65819..64330ba6 100644 --- a/src/short-urls/CreateShortUrl.js +++ b/src/short-urls/CreateShortUrl.js @@ -5,7 +5,7 @@ import { assoc, dissoc, isNil, pick, pipe, replace, trim } from 'ramda'; import React from 'react'; import { connect } from 'react-redux'; import { Collapse } from 'reactstrap'; -import DateInput from '../common/DateInput'; +import DateInput from '../utils/DateInput'; import TagsSelector from '../tags/helpers/TagsSelector'; import CreateShortUrlResult from './helpers/CreateShortUrlResult'; import { createShortUrl, resetCreateShortUrl } from './reducers/shortUrlCreation'; diff --git a/src/common/DateInput.js b/src/utils/DateInput.js similarity index 100% rename from src/common/DateInput.js rename to src/utils/DateInput.js index a6586b47..e7f32b07 100644 --- a/src/common/DateInput.js +++ b/src/utils/DateInput.js @@ -1,8 +1,8 @@ -import calendarIcon from '@fortawesome/fontawesome-free-regular/faCalendarAlt'; -import FontAwesomeIcon from '@fortawesome/react-fontawesome'; import React from 'react'; -import DatePicker from 'react-datepicker'; import { isNil } from 'ramda'; +import DatePicker from 'react-datepicker'; +import FontAwesomeIcon from '@fortawesome/react-fontawesome'; +import calendarIcon from '@fortawesome/fontawesome-free-regular/faCalendarAlt'; import './DateInput.scss'; export default class DateInput extends React.Component { diff --git a/src/common/DateInput.scss b/src/utils/DateInput.scss similarity index 88% rename from src/common/DateInput.scss rename to src/utils/DateInput.scss index 3c759665..5f2e23ff 100644 --- a/src/common/DateInput.scss +++ b/src/utils/DateInput.scss @@ -1,5 +1,5 @@ -@import '../utils/mixins/vertical-align'; -@import '../utils/base'; +@import './mixins/vertical-align'; +@import './base'; .date-input-container { position: relative; diff --git a/src/visits/ShortUrlVisits.js b/src/visits/ShortUrlVisits.js index e84fd713..037157de 100644 --- a/src/visits/ShortUrlVisits.js +++ b/src/visits/ShortUrlVisits.js @@ -5,7 +5,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { Card } from 'reactstrap'; import PropTypes from 'prop-types'; -import DateInput from '../common/DateInput'; +import DateInput from '../utils/DateInput'; import MutedMessage from '../utils/MuttedMessage'; import SortableBarGraph from './SortableBarGraph'; import { getShortUrlVisits, shortUrlVisitsType } from './reducers/shortUrlVisits'; diff --git a/test/common/DateInput.test.js b/test/utils/DateInput.test.js similarity index 95% rename from test/common/DateInput.test.js rename to test/utils/DateInput.test.js index 6ec0bbbd..d562b2d0 100644 --- a/test/common/DateInput.test.js +++ b/test/utils/DateInput.test.js @@ -2,7 +2,7 @@ import React from 'react'; import { shallow } from 'enzyme'; import FontAwesomeIcon from '@fortawesome/react-fontawesome'; import moment from 'moment'; -import DateInput from '../../src/common/DateInput'; +import DateInput from '../../src/utils/DateInput'; describe('', () => { let wrapped; diff --git a/test/visits/ShortUrlVisits.test.js b/test/visits/ShortUrlVisits.test.js index f2f236e3..f103987d 100644 --- a/test/visits/ShortUrlVisits.test.js +++ b/test/visits/ShortUrlVisits.test.js @@ -6,7 +6,7 @@ import * as sinon from 'sinon'; import { ShortUrlsVisitsComponent as ShortUrlsVisits } from '../../src/visits/ShortUrlVisits'; import MutedMessage from '../../src/utils/MuttedMessage'; import GraphCard from '../../src/visits/GraphCard'; -import DateInput from '../../src/common/DateInput'; +import DateInput from '../../src/utils/DateInput'; import SortableBarGraph from '../../src/visits/SortableBarGraph'; describe('', () => {