diff --git a/src/components/Footer/__snapshots__/test.js.snap b/src/components/Footer/__snapshots__/test.js.snap
index a11faa4..70d1a8c 100644
--- a/src/components/Footer/__snapshots__/test.js.snap
+++ b/src/components/Footer/__snapshots__/test.js.snap
@@ -4,13 +4,7 @@ exports[`Footer rendering 1`] = `
ShallowWrapper {
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): ,
Symbol(enzyme.__renderer__): Object {
diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js
index 7c0c9de..62911f0 100644
--- a/src/components/Footer/index.js
+++ b/src/components/Footer/index.js
@@ -15,7 +15,7 @@ const query = graphql`
}
`;
-export const Footer = ({ t, site: { siteMetadata } }) => (
+export const Footer = ({ t, buildId }) => (
);
Footer.propTypes = {
t: PropTypes.func.isRequired,
- site: PropTypes.shape({
- siteMetadata: PropTypes.shape({
- buildId: PropTypes.string.isRequired
- }).isRequired
- }).isRequired
+ buildId: PropTypes.string.isRequired
};
export default withNamespaces()(props => (
- (
-
+ (
+
) } />
));
diff --git a/src/components/Footer/test.js b/src/components/Footer/test.js
index 47e0071..e681fc2 100644
--- a/src/components/Footer/test.js
+++ b/src/components/Footer/test.js
@@ -7,7 +7,7 @@ import { Footer } from 'components/Footer';
describe('Footer', () => {
test('rendering', () => {
const component = shallow(
-
+
);
expect(component).toMatchSnapshot();
});
diff --git a/src/components/Header/__snapshots__/test.js.snap b/src/components/Header/__snapshots__/test.js.snap
index 52e7a4e..15475cf 100644
--- a/src/components/Header/__snapshots__/test.js.snap
+++ b/src/components/Header/__snapshots__/test.js.snap
@@ -4,13 +4,7 @@ exports[`Header rendering 1`] = `
ShallowWrapper {
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): ,
Symbol(enzyme.__renderer__): Object {
"batchedUpdates": [Function],
@@ -540,13 +534,7 @@ exports[`Header rendering with no banner 1`] = `
ShallowWrapper {
Symbol(enzyme.__root__): [Circular],
Symbol(enzyme.__unrendered__): ,
Symbol(enzyme.__renderer__): Object {
"batchedUpdates": [Function],
diff --git a/src/components/Header/index.js b/src/components/Header/index.js
index 9f637e7..55aee00 100644
--- a/src/components/Header/index.js
+++ b/src/components/Header/index.js
@@ -19,10 +19,10 @@ const query = graphql`
}
`;
-export const Header = ({ site: { siteMetadata } }) => (
+export const Header = ({ banner }) => (
+ data-banner={ banner || null }>
Regexper
@@ -49,18 +49,14 @@ export const Header = ({ site: { siteMetadata } }) => (
);
Header.propTypes = {
- site: PropTypes.shape({
- siteMetadata: PropTypes.shape({
- banner: PropTypes.oneOfType([
- PropTypes.bool,
- PropTypes.string
- ]).isRequired
- }).isRequired
- }).isRequired
+ banner: PropTypes.oneOfType([
+ PropTypes.bool,
+ PropTypes.string
+ ]).isRequired
};
export default withNamespaces()(props => (
- (
-
+ (
+
) } />
));
diff --git a/src/components/Header/test.js b/src/components/Header/test.js
index f4c3dca..7d64c25 100644
--- a/src/components/Header/test.js
+++ b/src/components/Header/test.js
@@ -6,14 +6,14 @@ import { Header } from 'components/Header';
describe('Header', () => {
test('rendering', () => {
const component = shallow(
-
+
);
expect(component).toMatchSnapshot();
});
test('rendering with no banner', () => {
const component = shallow(
-
+
);
expect(component).toMatchSnapshot();
});