Before submitting
Chapter URL
https://nextjs.org/learn/dashboard-app/adding-search-and-pagination
Issue Type
Missing information
Description
The pagination.tsx starter file for Chapter 10 uses the allPages variable
in its JSX but never defines it. The generatePagination function is already
imported at the top of the file but is never called. The tutorial text shows
a // ... comment in that section without mentioning that this line needs to
be added:
const allPages = generatePagination(currentPage, totalPages);
Without this line, the component immediately throws a ReferenceError and the
app crashes.
Expected vs Actual Behavior
Expected: The pagination component renders correctly after following the
tutorial steps.
Actual: The app crashes with "ReferenceError: allPages is not defined"
because the starter file is missing the allPages variable definition.
There is no mention of this in the tutorial text, so it cannot be fixed
without debugging the error yourself.
Environment (optional)
No response
Screenshots (optional)

Before submitting
Chapter URL
https://nextjs.org/learn/dashboard-app/adding-search-and-pagination
Issue Type
Missing information
Description
The pagination.tsx starter file for Chapter 10 uses the
allPagesvariablein its JSX but never defines it. The
generatePaginationfunction is alreadyimported at the top of the file but is never called. The tutorial text shows
a
// ...comment in that section without mentioning that this line needs tobe added:
const allPages = generatePagination(currentPage, totalPages);
Without this line, the component immediately throws a ReferenceError and the
app crashes.
Expected vs Actual Behavior
Expected: The pagination component renders correctly after following the
tutorial steps.
Actual: The app crashes with "ReferenceError: allPages is not defined"
because the starter file is missing the
allPagesvariable definition.There is no mention of this in the tutorial text, so it cannot be fixed
without debugging the error yourself.
Environment (optional)
No response
Screenshots (optional)