From 902adeb9d1da489cfd33925b1f3cbcbded5bcfa0 Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Mon, 6 Feb 2023 01:05:21 -0500 Subject: [PATCH] sketch --- doordesk/src/components/Blog.tsx | 2 -- doordesk/src/components/Home.tsx | 29 +++++++++++++++++++++++----- doordesk/src/components/Projects.tsx | 24 ++++++++++++++++++----- 3 files changed, 43 insertions(+), 12 deletions(-) diff --git a/doordesk/src/components/Blog.tsx b/doordesk/src/components/Blog.tsx index 81e4c59..51a9b79 100644 --- a/doordesk/src/components/Blog.tsx +++ b/doordesk/src/components/Blog.tsx @@ -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', diff --git a/doordesk/src/components/Home.tsx b/doordesk/src/components/Home.tsx index 6fc3c58..3d78739 100644 --- a/doordesk/src/components/Home.tsx +++ b/doordesk/src/components/Home.tsx @@ -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 { constructor(props: IHomeProps) { super(props) } + renderPosts(urls: string[]): JSX.Element[] { + return ( + urls.map((postURL) => ) + ) + } render() { return ( -
-
-

home is where your guns are

-
-
+ <> + {this.renderPosts(FAKE_IT_TIL_YOU_MAKE_IT)} + ) } } diff --git a/doordesk/src/components/Projects.tsx b/doordesk/src/components/Projects.tsx index 8b42a24..86be5d8 100644 --- a/doordesk/src/components/Projects.tsx +++ b/doordesk/src/components/Projects.tsx @@ -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 { constructor(props: IProjectsProps) { super(props) } + renderPosts(urls: string[]): JSX.Element[] { + return ( + urls.map((postURL) => ) + ) + } render() { return ( -
-
-

project deez

-
-
+ <> + {this.renderPosts(FAKE_IT_TIL_YOU_MAKE_IT)} + ) } }