-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix function active/archived tab switching #1284
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
...shboard/src/app/(organization-active)/(dashboard)/env/[environmentSlug]/functions/useRows.ts
Outdated
Show resolved
Hide resolved
…v/[environmentSlug]/functions/useRows.ts Co-authored-by: Tony Holdstock-Brown <tony@inngest.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a single question, but I can see how the existing change looks like a valid and correct fix!
return; | ||
} | ||
|
||
if (functionsRes.data.page.page > functionsData.lastPage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this know to setFunctionsData
on only archived vs. not archived?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data is cleared out when archived
changes:
https://github.com/inngest/inngest/blob/main/ui/apps/dashboard/src/app/(organization-active)/(dashboard)/env/%5BenvironmentSlug%5D/functions/useRows.ts#L33
This whole hook needs to be refactored. It's probably the worst code I've written here
Description
Fix stale data when switching between active and archived functions
Type of change (choose one)
Checklist
Check our Pull Request Guidelines