import { useState } from 'react' import Image from 'next/future/image' import Link from 'next/link' import BlogPostCard from '../components/BlogPostCard' import VideoCard from '../components/VideoCard' import prisma from 'lib/prisma' export default function Home({ initialPosts }) { const [posts, setPosts] = useState(initialPosts) return (

Featured

{posts && posts.map((post: any) => ( ))}
Read all posts...

Learn React & Next.js

Build and deploy a modern SaaS application using the most popular open-source software. This course is 12 hours long and is completely live streamed.

Watch all videos ///
) } export async function getServerSideProps() { const posts = await prisma.blogPost.findMany() return { props: { initialPosts: posts }, } }