Learn Dashboard Invoice Page Line 20 should be a number
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
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:
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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