diff --git a/src/components/HeroSection/HeroSection.css b/src/components/SectionHero/SectionHero.css similarity index 100% rename from src/components/HeroSection/HeroSection.css rename to src/components/SectionHero/SectionHero.css diff --git a/src/components/HeroSection/HeroSection.js b/src/components/SectionHero/SectionHero.js similarity index 82% rename from src/components/HeroSection/HeroSection.js rename to src/components/SectionHero/SectionHero.js index 3a8d7e02..8986c15e 100644 --- a/src/components/HeroSection/HeroSection.js +++ b/src/components/SectionHero/SectionHero.js @@ -8,9 +8,9 @@ import routeConfiguration from '../../routeConfiguration'; import { IconSearch, Button } from '../../components'; import { LocationSearchForm } from '../../containers'; -import css from './HeroSection.css'; +import css from './SectionHero.css'; -const HeroSection = props => { +const SectionHero = props => { const { rootClassName, className, history, location } = props; const handleMobileSearchClick = () => { @@ -31,25 +31,25 @@ const HeroSection = props => { return (

- +

- +

); }; -HeroSection.defaultProps = { rootClassName: null, className: null }; +SectionHero.defaultProps = { rootClassName: null, className: null }; const { string, shape, func } = PropTypes; -HeroSection.propTypes = { +SectionHero.propTypes = { rootClassName: string, className: string, @@ -61,4 +61,4 @@ HeroSection.propTypes = { }).isRequired, }; -export default HeroSection; +export default SectionHero; diff --git a/src/components/HeroSection/HeroSection.test.js b/src/components/SectionHero/SectionHero.test.js similarity index 71% rename from src/components/HeroSection/HeroSection.test.js rename to src/components/SectionHero/SectionHero.test.js index cf5374ec..a7f41a19 100644 --- a/src/components/HeroSection/HeroSection.test.js +++ b/src/components/SectionHero/SectionHero.test.js @@ -1,17 +1,17 @@ import React from 'react'; import { renderDeep } from '../../util/test-helpers'; -import HeroSection from './HeroSection'; +import SectionHero from './SectionHero'; const noop = () => null; -describe('HeroSection', () => { +describe('SectionHero', () => { it('matches snapshot', () => { window.google = { maps: {} }; const heroProps = { history: { push: noop }, location: { search: '' }, }; - const tree = renderDeep(); + const tree = renderDeep(); delete window.google; expect(tree).toMatchSnapshot(); }); diff --git a/src/components/HeroSection/__snapshots__/HeroSection.test.js.snap b/src/components/SectionHero/__snapshots__/SectionHero.test.js.snap similarity index 97% rename from src/components/HeroSection/__snapshots__/HeroSection.test.js.snap rename to src/components/SectionHero/__snapshots__/SectionHero.test.js.snap index 97ad1e16..9e9aee4f 100644 --- a/src/components/HeroSection/__snapshots__/HeroSection.test.js.snap +++ b/src/components/SectionHero/__snapshots__/SectionHero.test.js.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`HeroSection matches snapshot 1`] = ` +exports[`SectionHero matches snapshot 1`] = `
diff --git a/src/components/index.js b/src/components/index.js index e70b5dbe..786fec7c 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -28,7 +28,6 @@ export { default as ExternalLink } from './ExternalLink/ExternalLink'; export { default as FilterPanel } from './FilterPanel/FilterPanel'; export { default as Footer } from './Footer/Footer'; export { default as Form } from './Form/Form'; -export { default as HeroSection } from './HeroSection/HeroSection'; export { default as IconBannedUser } from './IconBannedUser/IconBannedUser'; export { default as IconCheckmark } from './IconCheckmark/IconCheckmark'; export { default as IconClose } from './IconClose/IconClose'; @@ -85,6 +84,7 @@ export { default as SearchMapGroupLabel } from './SearchMapGroupLabel/SearchMapG export { default as SearchMapInfoCard } from './SearchMapInfoCard/SearchMapInfoCard'; export { default as SearchMapPriceLabel } from './SearchMapPriceLabel/SearchMapPriceLabel'; export { default as SearchResultsPanel } from './SearchResultsPanel/SearchResultsPanel'; +export { default as SectionHero } from './SectionHero/SectionHero'; export { default as SelectField } from './SelectField/SelectField'; export { default as StripeBankAccountTokenInputField, diff --git a/src/containers/LandingPage/LandingPage.css b/src/containers/LandingPage/LandingPage.css index ed4d75dc..a9706a7d 100644 --- a/src/containers/LandingPage/LandingPage.css +++ b/src/containers/LandingPage/LandingPage.css @@ -3,7 +3,7 @@ .root { } -/* heroContainer gives the height for HeroSection */ +/* heroContainer gives the height for SectionHero */ /* Safari has a bug with vw padding inside flexbox. Therefore we need an extra div (container) */ .heroContainer { display: flex; diff --git a/src/containers/LandingPage/LandingPage.js b/src/containers/LandingPage/LandingPage.js index 49df84fb..a59c25e3 100644 --- a/src/containers/LandingPage/LandingPage.js +++ b/src/containers/LandingPage/LandingPage.js @@ -9,7 +9,7 @@ import { isScrollingDisabled } from '../../ducks/UI.duck'; import config from '../../config'; import { Page, - HeroSection, + SectionHero, LayoutSingleColumn, LayoutWrapperTopbar, LayoutWrapperMain, @@ -57,7 +57,7 @@ export const LandingPageComponent = props => {
- +
diff --git a/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap b/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap index 85e11b0e..f410f05b 100644 --- a/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap +++ b/src/containers/LandingPage/__snapshots__/LandingPage.test.js.snap @@ -52,7 +52,7 @@ exports[`LandingPage matches snapshot 1`] = ` rootClassName={null} >
-