Skip to content
Permalink
Browse files

Render <Row /> component with the layout properties

  • Loading branch information...
fmontes committed Feb 26, 2019
1 parent d5ba85d commit 63bd89cf30c9a057277c2ae4836d7e1ac68e24bf
Showing with 15 additions and 2 deletions.
  1. +8 −2 src/components/Page.js
  2. +7 −0 src/components/Row.js
@@ -1,7 +1,13 @@
import React from 'react';
import Row from './Row';

const Page = () => {
return <h1>Hello, I'm a Page</h1>;
const Page = props => {
const { layout } = props;
return layout
? layout.body.rows.map(row => {
return <Row key={row.identifier} />;
})
: null;
};

export default Page;
@@ -0,0 +1,7 @@
import React from 'react';

const Row = (props) => {
return <h1>I'm a Row</h1>;
};
export default Row;

0 comments on commit 63bd89c

Please sign in to comment.
You can’t perform that action at this time.