This is a Next.js project bootstrapped with create-next-app
.
Read CONTRIBUTING.md.
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
-
Create an endpoint in
api/people.ts
that returns a list of people. The list should be sorted byname
in ascending order. The data should be paginated and return 10 people per page. The endpoint should accept a parameterpage
that specifies the page number to return. The user data should be generated using faker.js or similar library. The minimum number of user is 100. It should be parametrized so that we can specify the number of users to generate. -
Use
tanstack/react-query
orswr
to fetch data inpages/task.tsx
. -
Prepare the pagination component to be used in
pages/task.tsx
.