sketch
This commit is contained in:
parent
f7742a702f
commit
902adeb9d1
3 changed files with 43 additions and 12 deletions
|
@ -8,9 +8,7 @@ import BlogPost from './BlogPost.js'
|
||||||
|
|
||||||
const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
|
const FAKE_IT_TIL_YOU_MAKE_IT: string[] = [
|
||||||
'blog/20220701-progress.html',
|
'blog/20220701-progress.html',
|
||||||
'blog/20220614-reddit.html',
|
|
||||||
'blog/20220602-back.html',
|
'blog/20220602-back.html',
|
||||||
'blog/20220529-housing.html',
|
|
||||||
'blog/20220520-nvidia.html',
|
'blog/20220520-nvidia.html',
|
||||||
'blog/20220506-change.html',
|
'blog/20220506-change.html',
|
||||||
'blog/000000000-swim.html',
|
'blog/000000000-swim.html',
|
||||||
|
|
|
@ -1,4 +1,20 @@
|
||||||
import { Component } from 'react'
|
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 {
|
interface IHomeProps {
|
||||||
}
|
}
|
||||||
|
@ -10,13 +26,16 @@ class Home extends Component<IHomeProps, IHomeState> {
|
||||||
constructor(props: IHomeProps) {
|
constructor(props: IHomeProps) {
|
||||||
super(props)
|
super(props)
|
||||||
}
|
}
|
||||||
|
renderPosts(urls: string[]): JSX.Element[] {
|
||||||
|
return (
|
||||||
|
urls.map((postURL) => <BlogPost key={postURL} postURL={postURL} />)
|
||||||
|
)
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="content-container">
|
<>
|
||||||
<div className="content">
|
{this.renderPosts(FAKE_IT_TIL_YOU_MAKE_IT)}
|
||||||
<p>home is where your guns are</p>
|
</>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
import { Component } from 'react'
|
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 {
|
interface IProjectsProps {
|
||||||
}
|
}
|
||||||
|
@ -10,13 +21,16 @@ class Projects extends Component<IProjectsProps, IProjectsState> {
|
||||||
constructor(props: IProjectsProps) {
|
constructor(props: IProjectsProps) {
|
||||||
super(props)
|
super(props)
|
||||||
}
|
}
|
||||||
|
renderPosts(urls: string[]): JSX.Element[] {
|
||||||
|
return (
|
||||||
|
urls.map((postURL) => <BlogPost key={postURL} postURL={postURL} />)
|
||||||
|
)
|
||||||
|
}
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="content-container">
|
<>
|
||||||
<div className="content">
|
{this.renderPosts(FAKE_IT_TIL_YOU_MAKE_IT)}
|
||||||
<p>project deez</p>
|
</>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue