Upgrade to Gatsby v2

This commit is contained in:
alxshelepenok
2018-11-09 20:08:48 +03:00
parent e83dfc6dff
commit 8b92891329
204 changed files with 18708 additions and 3904 deletions

View File

@@ -0,0 +1,15 @@
import React from 'react';
import Helmet from 'react-helmet';
import styles from './Layout.module.scss';
const Layout = ({ children, title, description }) => (
<div className={styles.layout}>
<Helmet>
<title>{title}</title>
<meta name="description" content={description} />
</Helmet>
{children}
</div>
);
export default Layout;

View File

@@ -0,0 +1,6 @@
@import '../../assets/scss/variables';
@import '../../assets/scss/mixins';
.layout {
lost-center: $layout-width;
}

View File

@@ -0,0 +1,16 @@
import React from 'react';
import renderer from 'react-test-renderer';
import Layout from './Layout';
describe('Layout', () => {
const props = {
children: 'test',
description: 'test',
title: 'test'
};
it('renders correctly', () => {
const tree = renderer.create(<Layout {...props} />).toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@@ -0,0 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Layout renders correctly 1`] = `
<div
className="layout"
>
test
</div>
`;

View File

@@ -0,0 +1 @@
export { default } from './Layout';