Skip to content

Instantly share code, notes, and snippets.

@popeating
Created November 3, 2023 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save popeating/ce1ad9c8a22a8059769f28a98ebe4cfa to your computer and use it in GitHub Desktop.
Save popeating/ce1ad9c8a22a8059769f28a98ebe4cfa to your computer and use it in GitHub Desktop.
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