diff --git a/src/components/MobileMenu/MobileMenu.css b/src/components/TopbarMobileMenu/TopbarMobileMenu.css similarity index 100% rename from src/components/MobileMenu/MobileMenu.css rename to src/components/TopbarMobileMenu/TopbarMobileMenu.css diff --git a/src/components/MobileMenu/MobileMenu.js b/src/components/TopbarMobileMenu/TopbarMobileMenu.js similarity index 71% rename from src/components/MobileMenu/MobileMenu.js rename to src/components/TopbarMobileMenu/TopbarMobileMenu.js index 1d729a7c..c08272ce 100644 --- a/src/components/MobileMenu/MobileMenu.js +++ b/src/components/TopbarMobileMenu/TopbarMobileMenu.js @@ -1,14 +1,14 @@ /** - * MobileMenu prints the menu content for authenticated user or + * TopbarMobileMenu prints the menu content for authenticated user or * shows login actions for those who are not authenticated. */ import React, { PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; import { Avatar, InlineButton, NamedLink } from '../../components'; -import css from './MobileMenu.css'; +import css from './TopbarMobileMenu.css'; -const MobileMenu = props => { +const TopbarMobileMenu = props => { const { isAuthenticated, currentUserHasListings, name, onLogout } = props; if (!isAuthenticated) { @@ -16,15 +16,15 @@ const MobileMenu = props => {
- + - +
- +
@@ -33,7 +33,7 @@ const MobileMenu = props => { const inboxLink = ( - + ); @@ -44,7 +44,7 @@ const MobileMenu = props => {
{name} - +
@@ -53,22 +53,22 @@ const MobileMenu = props => {
- +
); }; -MobileMenu.defaultProps = { name: '' }; +TopbarMobileMenu.defaultProps = { name: '' }; const { bool, func, string } = PropTypes; -MobileMenu.propTypes = { +TopbarMobileMenu.propTypes = { isAuthenticated: bool.isRequired, currentUserHasListings: bool.isRequired, name: string, onLogout: func.isRequired, }; -export default MobileMenu; +export default TopbarMobileMenu; diff --git a/src/components/index.js b/src/components/index.js index 976575fd..46a6354a 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -23,7 +23,6 @@ import LocationAutocompleteInput from './LocationAutocompleteInput/LocationAutoc import Map from './Map/Map'; import MapPanel from './MapPanel/MapPanel'; import Menu from './Menu/Menu'; -import MobileMenu from './MobileMenu/MobileMenu'; import Modal from './Modal/Modal'; import ModalInMobile from './ModalInMobile/ModalInMobile'; import NamedLink from './NamedLink/NamedLink'; @@ -41,6 +40,7 @@ import StripeBankAccountToken from './StripeBankAccountToken/StripeBankAccountTo import TabNav from './TabNav/TabNav'; import Tabs from './Tabs/Tabs'; import TopbarDesktop from './TopbarDesktop/TopbarDesktop'; +import TopbarMobileMenu from './TopbarMobileMenu/TopbarMobileMenu'; import ValidationError from './ValidationError/ValidationError'; export { @@ -71,7 +71,6 @@ export { Map, MapPanel, Menu, - MobileMenu, Modal, ModalInMobile, NamedLink, @@ -89,5 +88,6 @@ export { TabNav, Tabs, TopbarDesktop, + TopbarMobileMenu, ValidationError, }; diff --git a/src/containers/Topbar/Topbar.js b/src/containers/Topbar/Topbar.js index cc7dbd8c..e0bfaf49 100644 --- a/src/containers/Topbar/Topbar.js +++ b/src/containers/Topbar/Topbar.js @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { intlShape, injectIntl } from 'react-intl'; import { pickBy } from 'lodash'; import { logout, authenticationInProgress } from '../../ducks/Auth.duck'; -import { FlatButton, MobileMenu, Modal, NamedLink, TopbarDesktop } from '../../components'; +import { FlatButton, Modal, NamedLink, TopbarDesktop, TopbarMobileMenu } from '../../components'; import { SearchForm } from '../../containers'; import { withFlattenedRoutes } from '../../util/contextHelpers'; import { parse, stringify } from '../../util/urlHelpers'; @@ -101,7 +101,7 @@ class TopbarComponent extends Component { const isMobileMenuOpen = mobilemenu === 'open'; const isMobileSearchOpen = mobilesearch === 'open'; const mobileMenu = ( -