Skip to content
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

refactor: move incident CRUD to useIncidentActions() hook, unify revalidation #2335

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

Kiryous
Copy link
Contributor

@Kiryous Kiryous commented Oct 29, 2024

Closes #2334

📑 Description

  1. Move addIncident, updateIncident, deleteIncident, mergeIncidents to useIncidentsActions() hook, so apiUrl, session, revalidation all happens in one place and could be re-used.
  2. Remove not mutate prop drilling in favor of mutate(key => typeof key === "string" && key.startsWith(...)

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

Screen.Recording.2024-10-29.at.16.17.38.mov

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 29, 2024
Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
keep ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 0:21am

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 29, 2024
@Kiryous Kiryous merged commit 0570111 into main Oct 29, 2024
9 checks passed
@Kiryous Kiryous deleted the fix/2334-incident-list-updating branch October 29, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Incident List is not updating after new incident added or existing edited
2 participants