diff --git a/app/component/EmbeddedSearch/index.js b/app/component/EmbeddedSearch/index.js deleted file mode 100644 index f49bf5723b..0000000000 --- a/app/component/EmbeddedSearch/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './EmbeddedSearch'; diff --git a/app/component/EmbeddedSearch/EmbeddedSearch.js b/app/component/embedded/EmbeddedSearch.js similarity index 100% rename from app/component/EmbeddedSearch/EmbeddedSearch.js rename to app/component/embedded/EmbeddedSearch.js diff --git a/app/component/EmbeddedSearchContainer.js b/app/component/embedded/EmbeddedSearchContainer.js similarity index 88% rename from app/component/EmbeddedSearchContainer.js rename to app/component/embedded/EmbeddedSearchContainer.js index ccfefd49c0..2a8b2c9f5e 100644 --- a/app/component/EmbeddedSearchContainer.js +++ b/app/component/embedded/EmbeddedSearchContainer.js @@ -1,6 +1,6 @@ import React from 'react'; import { matchShape } from 'found'; -import LazilyLoad, { importLazy } from './LazilyLoad'; +import LazilyLoad, { importLazy } from '../LazilyLoad'; const modules = { EmbeddedSearch: () => importLazy(import('./EmbeddedSearch')), diff --git a/app/component/EmbeddedSearchGenerator.js b/app/component/embedded/EmbeddedSearchGenerator.js similarity index 98% rename from app/component/EmbeddedSearchGenerator.js rename to app/component/embedded/EmbeddedSearchGenerator.js index a59616d692..4ea453a537 100644 --- a/app/component/EmbeddedSearchGenerator.js +++ b/app/component/embedded/EmbeddedSearchGenerator.js @@ -3,16 +3,16 @@ import React, { useState, useRef } from 'react'; import { FormattedMessage, intlShape } from 'react-intl'; import connectToStores from 'fluxible-addons-react/connectToStores'; import DTAutosuggest from '@digitransit-component/digitransit-component-autosuggest'; -import { configShape } from '../util/shapes'; +import { configShape } from '../../util/shapes'; import EmbeddedSearch from './EmbeddedSearch'; -import { EMBEDDED_SEARCH_PATH } from '../util/path'; -import { getRefPoint } from '../util/apiUtils'; -import withBreakpoint from '../util/withBreakpoint'; +import { EMBEDDED_SEARCH_PATH } from '../../util/path'; +import { getRefPoint } from '../../util/apiUtils'; +import withBreakpoint from '../../util/withBreakpoint'; import { withSearchContext, getLocationSearchTargets, -} from './WithSearchContext'; -import { isBrowser } from '../util/browser'; +} from '../WithSearchContext'; +import { isBrowser } from '../../util/browser'; const LocationSearch = withSearchContext(DTAutosuggest, true); diff --git a/app/component/embedded-search-generator.scss b/app/component/embedded/embedded-search-generator.scss similarity index 100% rename from app/component/embedded-search-generator.scss rename to app/component/embedded/embedded-search-generator.scss diff --git a/app/component/embedded-search.scss b/app/component/embedded/embedded-search.scss similarity index 100% rename from app/component/embedded-search.scss rename to app/component/embedded/embedded-search.scss diff --git a/app/component/EmbeddedSearch/hooks/useUTMCampaignParams.js b/app/component/embedded/hooks/useUTMCampaignParams.js similarity index 100% rename from app/component/EmbeddedSearch/hooks/useUTMCampaignParams.js rename to app/component/embedded/hooks/useUTMCampaignParams.js diff --git a/app/routes.js b/app/routes.js index 6a63bd9a22..80835e28fc 100644 --- a/app/routes.js +++ b/app/routes.js @@ -385,7 +385,7 @@ export default config => { path={config.URL.EMBEDDED_SEARCH_GENERATION} getComponent={() => import( - /* webpackChunkName: "embedded-search-generator" */ './component/EmbeddedSearchGenerator' + /* webpackChunkName: "embedded-search-generator" */ './component/embedded/EmbeddedSearchGenerator' ).then(getDefault) } /> @@ -393,7 +393,7 @@ export default config => { path={EMBEDDED_SEARCH_PATH} getComponent={() => import( - /* webpackChunkName: "embedded-search" */ './component/EmbeddedSearchContainer' + /* webpackChunkName: "embedded-search" */ './component/embedded/EmbeddedSearchContainer' ).then(getDefault) } topBarOptions={{ hidden: true }} diff --git a/sass/_main.scss b/sass/_main.scss index 64b7b0246f..72407fcc07 100644 --- a/sass/_main.scss +++ b/sass/_main.scss @@ -43,8 +43,8 @@ $body-font-weight: $font-weight-medium; @import '../app/component/zone-icon'; @import '../app/component/date-select'; @import '../app/component/routepage/route-schedule-dropdown'; -@import '../app/component/embedded-search'; -@import '../app/component/embedded-search-generator'; +@import '../app/component/embedded/embedded-search'; +@import '../app/component/embedded/embedded-search-generator'; @import '../app/component/from-map-modal'; @import '../app/component/app-bar-hsl'; @import '../app/component/itinerary/itinerary';