posts
This commit is contained in:
parent
9bfdd2f9ca
commit
836294c229
1 changed files with 11 additions and 3 deletions
|
@ -1,6 +1,10 @@
|
|||
import { Component } from 'react'
|
||||
import BlogPost from './BlogPost.js'
|
||||
|
||||
const BLOG_URLS: string[] = [
|
||||
'blog/20220506-change.html',
|
||||
'blog/000000000-swim.html'
|
||||
]
|
||||
interface IBlogProps {
|
||||
}
|
||||
|
||||
|
@ -11,11 +15,15 @@ class Blog extends Component<IBlogProps, IBlogState> {
|
|||
constructor(props: IBlogProps) {
|
||||
super(props)
|
||||
}
|
||||
renderPosts(urls: string[]): JSX.Element[] {
|
||||
return (
|
||||
urls.map((postURL) => <BlogPost key={postURL} postURL={postURL} />)
|
||||
)
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<BlogPost postURL='blog/20220506-change.html' />
|
||||
<BlogPost postURL='blog/000000000-swim.html' />
|
||||
{this.renderPosts(BLOG_URLS)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue