// 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 (

Latest Releases

Our latest articles and explorations.

{posts && posts.map(({ _id, title, description, image, youtube, link }) => { const { thumbnail } = getYoutube(youtube) const imageSource = image || thumbnail return (
{imageSource ? {title} : ( ) }
) })}
{/*
{!(posts.length === initialPosts.length && value === initialValue) && }
*/}
) }