vercel / vercel/next-learn

Learn Dashboard Invoice Page Line 20 should be a number

Open
#753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.8k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/vercel/next-learn/blob/58f9a68c6a2a0050976e52969b0dcf427281610a/dashboard/final-example/app/dashboard/invoices/page.tsx#L20

Perhaps I'm incorrect about this, but I'm pretty sure that this should be of type number instead of string because later in the component page is used to derive the currentPage value. And according to the currentPage prop in the Table component, it's a number:

https://github.com/vercel/next-learn/blob/main/dashboard/final-example/app/ui/invoices/table.tsx#L12

VSCode calls out this problem as well:

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open dashboard/final-example/app/dashboard/invoices/page.tsx at line 20 and compare the page value with how it is used to derive currentPage. Check dashboard/final-example/app/ui/invoices/table.tsx to confirm the Table prop type. Done when the type matches the value expected by Table and the VSCode type error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, typescript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.