This commit is contained in:
Adam 2023-02-06 01:05:21 -05:00
parent f7742a702f
commit 902adeb9d1
3 changed files with 43 additions and 12 deletions

View file

@ -8,9 +8,7 @@ import BlogPost from './BlogPost.js'
const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
'blog/20220701-progress.html',
'blog/20220614-reddit.html',
'blog/20220602-back.html',
'blog/20220529-housing.html',
'blog/20220520-nvidia.html',
'blog/20220506-change.html',
'blog/000000000-swim.html',

View file

@ -1,4 +1,20 @@
import { Component } from 'react'
import BlogPost from './BlogPost.js'
// should render one by one
// make api that has post id, title, date, etc with url to article; then
// distribute to blog posts
const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
'blog/20220701-progress.html',
'blog/20220614-reddit.html',
'blog/20220602-back.html',
'blog/20220529-housing.html',
'blog/20220520-nvidia.html',
'blog/20220506-change.html',
'blog/000000000-swim.html',
]
interface IHomeProps {
}
@ -10,13 +26,16 @@ class Home extends Component<IHomeProps, IHomeState> {
constructor(props: IHomeProps) {
super(props)
}
renderPosts(urls: string[]): JSX.Element[] {
return (
urls.map((postURL) => <BlogPost key={postURL} postURL={postURL} />)
)
}
render() {
return (
<div className="content-container">
<div className="content">
<p>home is where your guns are</p>
</div>
</div>
<>
{this.renderPosts(FAKE_IT_TIL_YOU_MAKE_IT)}
</>
)
}
}

View file

@ -1,4 +1,15 @@
import { Component } from 'react'
import BlogPost from './BlogPost.js'
// should render one by one
// make api that has post id, title, date, etc with url to article; then
// distribute to blog posts
const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
'blog/20220614-reddit.html',
'blog/20220529-housing.html',
]
interface IProjectsProps {
}
@ -10,13 +21,16 @@ class Projects extends Component<IProjectsProps, IProjectsState> {
constructor(props: IProjectsProps) {
super(props)
}
renderPosts(urls: string[]): JSX.Element[] {
return (
urls.map((postURL) => <BlogPost key={postURL} postURL={postURL} />)
)
}
render() {
return (
<div className="content-container">
<div className="content">
<p>project deez</p>
</div>
</div>
<>
{this.renderPosts(FAKE_IT_TIL_YOU_MAKE_IT)}
</>
)
}
}