-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(UI-1242): add warning modal for organization deletion #931
base: main
Are you sure you want to change the base?
Conversation
src/hooks/useDeleteOrganization.tsx
Outdated
addToast({ | ||
message: t("table.messages.organizationDeleted", { name: organization.displayName }), | ||
type: "success", | ||
}); |
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.
Hooks are also part of the business logic, I found this article that describes it very well:
https://medium.com/design-bootcamp/separating-%EF%B8%8F-business-logic-from-ui-components-in-react-18-aa1775b3caba
Business logic shouldn't be mixed with the UI layer.
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.
refactored
✅ Deploy Preview for kittest ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Description
If the user has projects (1 or more) in the deleted organization, display an error modal - "To delete the organization, you have to delete all projects in it first".
If the user has 0 projects in the organization, display the regular delete modal.
Linear Ticket
https://linear.app/autokitteh/issue/UI-1242/block-organization-delete-if-it-has-active-projects
What type of PR is this? (check all applicable)