Skip to content

Commit

Permalink
Use Fragments instead of divs
Browse files Browse the repository at this point in the history
  • Loading branch information
domyen committed Jun 14, 2018
1 parent ec7fd0f commit c500116
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/layouts/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import styled, { css } from 'styled-components';
Expand Down Expand Up @@ -26,7 +26,7 @@ const TemplateWrapper = ({
location: { pathname },
children,
}) => (
<div>
<Fragment>
<Helmet title={title} meta={[{ name: 'description', content: description }]}>
<link
rel="shortcut icon"
Expand Down Expand Up @@ -54,9 +54,9 @@ const TemplateWrapper = ({
firstChapter={toc[0]}
/>

<div>{children()}</div>
{children()}
<Footer />
</div>
</Fragment>
);

TemplateWrapper.propTypes = {
Expand Down
6 changes: 3 additions & 3 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { Fragment } from 'react';
import styled from 'styled-components';
import { darken } from 'polished';

Expand Down Expand Up @@ -222,7 +222,7 @@ export default ({ data: { site: { siteMetadata: { toc, defaultTranslation } }, p
const firstChapter = toc[0];

return (
<div>
<Fragment>
<Wrapper>
<Content>
<Pitch>
Expand Down Expand Up @@ -372,7 +372,7 @@ export default ({ data: { site: { siteMetadata: { toc, defaultTranslation } }, p
}
/>
</FAQLayout>
</div>
</Fragment>
);
};

Expand Down

0 comments on commit c500116

Please sign in to comment.