diff --git a/site/components/Home/Latest.js b/site/components/Home/Latest.js index d12c367..614e604 100644 --- a/site/components/Home/Latest.js +++ b/site/components/Home/Latest.js @@ -1,4 +1,20 @@ +// import { useState } from "react" +import Link from "next/link" +import { YOUTUBE_REGEX } from "../../lib/constants" +import { getYoutube } from "../../utils/getYoutube" + export function Latest({ posts }) { + // const initialValue = 6 + // const [ value, setValue ] = useState(initialValue) + // const initialPosts = posts && posts.slice(0, value) + + // const handleButton = () => { + // setValue(prev => + // initialPosts.length === posts.length + // ? initialValue + // : prev + 3) + // } + return (
@@ -11,37 +27,54 @@ export function Latest({ posts }) { Our latest articles and explorations.

-
- {posts && posts.map((post) => ( -
- {post.image ? -
- {post.title} -
- :
- } -
- + {/*
+ {!(posts.length === initialPosts.length && value === initialValue) && + + } +
*/}
)