UNPKG

nyg-static-jam3

Version:

Jam3 frontend static project scaffold generator based on nyg

19 lines (17 loc) 393 B
import React from 'react' import { withRouteData } from 'react-static' import { Link } from '@reach/router' export default withRouteData(({ posts }) => ( <div> <h1>It's blog time.</h1> <br /> All Posts: <ul> {posts.map(post => ( <li key={post.id}> <Link to={`/blog/post/${post.id}/`}>{post.title}</Link> </li> ))} </ul> </div> ))