Learn NextJs 13

Faraz Khan

This is a markdown file

Subscribe to my Newsletter

Here is a list of items:

  • Item one
  • Item two
  • Item three
import React from 'react'
import { getPostbySlug } from '@/lib/posts';
 
const LearnNextJsPage = async ({ params }) => {
 
   const { slug } = params;
 
   const { content, data } = await getPostbySlug(slug)
 
   return (
      <section className='py-24'>
         <div className='container'>
            <header className="rounded bg-gray-200 p-8 mb-10">
               <h1 className='font-serif text-3xl'>{data?.title}</h1>
               <p className='text-sm font-light uppercase leading-4 text-gray-500'>
                  Faraz Khan
               </p>
            </header>
 
            {/* {Post Content} */}
            <main className='prose mt-12'>{content}</main>
         </div>
      </section>
   )
}
 
export default LearnNextJsPage