Why navigation to /dashboard/customer or /dashboard/invoices will trigger RevenueChart to call fetchRevenue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
RevenueChart is in the /dashboard Page, why will trigger RevenueChart to refresh when navigation to other page, such as
/dashboard/customer, /dashboard/invoices, /dashboard/invoices/14/edit.
this will cause many sql query, even if we not needed.
I am newbie to nextjs, hope give me some solutions.
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
Start at the /dashboard page and inspect how RevenueChart invokes fetchRevenue during navigation to /dashboard/customer, /dashboard/invoices, and /dashboard/invoices/14/edit. Reproduce the navigation and observe the SQL queries; done means RevenueChart does not refresh, and fetchRevenue does not run, when those other pages are opened.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100