Created
November 3, 2023 13:35
-
-
Save popeating/ce1ad9c8a22a8059769f28a98ebe4cfa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { contactList } from '@/actions/actions'; | |
import Add from '@/components/add'; | |
import Pagination from '@/components/pagination'; | |
import Table from '@/components/table'; | |
export default async function Home({ params, searchParams }) { | |
const { contacts, pages } = await contactList(searchParams); | |
return ( | |
<div className="container mx-auto mb-16"> | |
<h3 className="text-3xl mb-4">MY AMAZING CONTACTS</h3> | |
<div className="mb-4"> | |
{contacts ? <Table contacts={contacts} /> : 'null'} | |
</div> | |
<Pagination pages={pages} /> | |
<div> | |
<Add /> | |
</div> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment