Merge pull request #196 from sharetribe/prettier-fix-for-topbardesktop

Prettier was not executed for TopbarDesktop
This commit is contained in:
Vesa Luusua 2017-05-30 17:02:45 +03:00 committed by GitHub
commit 2e354177a0
4 changed files with 11 additions and 16 deletions

View file

@ -1,7 +1,6 @@
import { fakeIntl } from '../../util/test-data';
import TopbarDesktop from './TopbarDesktop';
export const AuthenticatedDesktopTopbar = {
component: TopbarDesktop,
props: {

View file

@ -49,12 +49,18 @@ const TopbarDesktop = props => {
return (
<div className={classes}>
<NamedLink className={css.logoLink} name="LandingPage">
<img className={css.logo} src={logo} alt={intl.formatMessage({ id: 'TopbarDesktop.logo' })} />
<img
className={css.logo}
src={logo}
alt={intl.formatMessage({ id: 'TopbarDesktop.logo' })}
/>
</NamedLink>
{search}
<div className={css.spacer} />
<NamedLink className={css.createListingLink} name="NewListingPage">
<span className={css.createListing}><FormattedMessage id="TopbarDesktop.createListing" /></span>
<span className={css.createListing}>
<FormattedMessage id="TopbarDesktop.createListing" />
</span>
</NamedLink>
{inboxLink}
{profileMenu}

View file

@ -11,15 +11,9 @@ describe('TopbarDesktop', () => {
const flattenedRoutes = flattenRoutes(routesConfiguration);
const tree = renderDeep(
<RoutesProvider flattenedRoutes={flattenedRoutes}>
<TopbarDesktop
isAuthenticated
currentUserHasListings
name="John Doe"
intl={fakeIntl}
/>
<TopbarDesktop isAuthenticated currentUserHasListings name="John Doe" intl={fakeIntl} />
</RoutesProvider>
);
expect(tree).toMatchSnapshot();
});
});

View file

@ -99,12 +99,8 @@ const Nav = props => {
const filteredGroups = groups.filter(g => g !== ALL && g !== DEFAULT_GROUP);
const basicStylings = ['typography', 'colors'];
const basicStylingGroups = filteredGroups
.filter(g => basicStylings.includes(g))
.map(toGroupLink);
const componentGroups = filteredGroups
.filter(g => !basicStylings.includes(g))
.map(toGroupLink);
const basicStylingGroups = filteredGroups.filter(g => basicStylings.includes(g)).map(toGroupLink);
const componentGroups = filteredGroups.filter(g => !basicStylings.includes(g)).map(toGroupLink);
return (
<nav className={css.withMargin}>