-
Notifications
You must be signed in to change notification settings - Fork 544
feat: create/delete teams #7293
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe changes add asynchronous functions for creating and deleting teams with authentication and error handling. UI components across the dashboard are updated to enable team creation and deletion, replacing placeholders and disabled buttons. Permission checks and navigation flows are improved, including redirecting users without teams to the account page. Deprecated annotations are added where appropriate. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI_Component
participant Actions_Module
participant API_Server
participant Router
participant Toast
User->>UI_Component: Click "Create Team"
UI_Component->>Actions_Module: createTeam({})
Actions_Module->>API_Server: POST /v1/teams (with auth)
API_Server-->>Actions_Module: Team data / Error
Actions_Module-->>UI_Component: { status: "success", data } or { status: "error", errorMessage }
alt Success
UI_Component->>Router: Navigate to /team/[slug]
UI_Component->>Toast: Show success message
else Failure
UI_Component->>Toast: Show error message
end
sequenceDiagram
participant User
participant UI_Component
participant Actions_Module
participant API_Server
participant Router
participant Toast
User->>UI_Component: Click "Delete Team"
UI_Component->>Actions_Module: deleteTeam({ teamId })
Actions_Module->>API_Server: DELETE /v1/teams/{teamId} (with auth)
API_Server-->>Actions_Module: 200 OK / Error
alt Success
UI_Component->>Router: Navigate to /team
UI_Component->>Toast: Show success message
else Failure
UI_Component->>Toast: Show error message
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (16)
🚧 Files skipped from review as they are similar to previous changes (16)
⏰ Context from checks skipped due to timeout of 90000ms (8)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7293 +/- ##
=======================================
Coverage 55.57% 55.57%
=======================================
Files 909 909
Lines 58673 58673
Branches 4158 4158
=======================================
Hits 32607 32607
Misses 25959 25959
Partials 107 107
🚀 New features to boost your workflow:
|
size-limit report 📦
|
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.
Actionable comments posted: 3
🧹 Nitpick comments (4)
apps/dashboard/src/@/api/team.ts (1)
70-70
: Enhance the deprecation annotation with more context.The deprecation annotation should include the reason for deprecation and what developers should use instead to provide better guidance.
-/** @deprecated */ +/** @deprecated Use the new createTeam and deleteTeam actions instead. This function will be removed in a future version. */apps/dashboard/src/@/actions/createTeam.ts (3)
39-39
: Consider shorter slug generation for better UX.The current implementation generates a 40-character slug using
randomBytes(20).toString("hex")
, which may be too long for user-friendly URLs. Consider using a shorter identifier or a more URL-friendly generation method.- slug: options.slug ?? randomBytes(20).toString("hex"), + slug: options.slug ?? randomBytes(8).toString("hex"),Or consider using a more readable format:
- slug: options.slug ?? randomBytes(20).toString("hex"), + slug: options.slug ?? `team-${randomBytes(4).toString("hex")}`,
9-21
: Consider adding input validation for robustness.The function accepts optional parameters but doesn't validate them. Consider adding basic validation to ensure name and slug meet expected criteria (length limits, character restrictions, etc.).
+const createTeamSchema = z.object({ + name: z.string().max(50).optional(), + slug: z.string().max(30).regex(/^[a-z0-9-]+$/).optional(), +}); export async function createTeam(options: { name?: string; slug?: string; }): Promise< | { ok: true; data: Team; } | { ok: false; errorMessage: string; } > { + const validatedOptions = createTeamSchema.parse(options);
45-50
: Consider more specific error handling.The current error handling returns the raw response text, which might not always be user-friendly. Consider parsing the error response or providing more context about the failure.
if (!res.ok) { + let errorMessage: string; + try { + const errorJson = await res.json(); + errorMessage = errorJson.message || errorJson.error || "Failed to create team"; + } catch { + errorMessage = `Failed to create team (${res.status})`; + } return { ok: false, - errorMessage: await res.text(), + errorMessage, }; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
apps/dashboard/src/@/actions/createTeam.ts
(1 hunks)apps/dashboard/src/@/actions/deleteTeam.ts
(1 hunks)apps/dashboard/src/@/api/team.ts
(1 hunks)apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx
(2 hunks)apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx
(3 hunks)apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx
(5 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx
(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (6)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx (1)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx (1)
DeleteTeamCard
(296-350)
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx (1)
apps/dashboard/src/@/actions/deleteTeam.ts (1)
deleteTeam
(5-25)
apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx (1)
apps/dashboard/src/@/actions/createTeam.ts (1)
createTeam
(9-58)
apps/dashboard/src/@/actions/deleteTeam.ts (2)
apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts (1)
getAuthToken
(6-14)apps/dashboard/src/@/constants/public-envs.ts (1)
NEXT_PUBLIC_THIRDWEB_API_HOST
(21-22)
apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx (1)
apps/dashboard/src/@/actions/createTeam.ts (1)
createTeam
(9-58)
apps/dashboard/src/@/actions/createTeam.ts (3)
apps/dashboard/src/@/api/team.ts (1)
Team
(9-9)apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts (1)
getAuthToken
(6-14)apps/dashboard/src/@/constants/public-envs.ts (1)
NEXT_PUBLIC_THIRDWEB_API_HOST
(21-22)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Size
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (24)
apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx (1)
62-62
: LGTM! Consistent storybook prop addition.The
createTeam
prop addition follows the same pattern as the existingcreateProject
prop and uses an appropriate empty function for storybook testing.apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx (1)
158-158
: LGTM! Consistent storybook prop addition.The
createTeam
prop addition is consistent with the pattern used in other storybook files and uses an appropriate empty function for testing purposes.apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx (2)
20-20
: LGTM! Proper prop type definition.The
createTeam
callback prop type is correctly defined and follows TypeScript best practices with a clear function signature.
55-55
: LGTM! Correct prop passing.The
createTeam
prop is properly passed down to theTeamSelectionUI
component, enabling the team creation functionality in the mobile menu.apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx (1)
65-66
: LGTM! Storybook stories correctly updated for new DeleteTeamCard interface.The prop changes from
enabled
tocanDelete
and the addition ofteamId
are properly reflected in the story variants, providing good test coverage for both permission states.apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx (2)
25-25
: LGTM! Clean addition of createTeam callback to component interface.
104-107
: LGTM! Proper UX implementation for team creation.The implementation correctly closes the popover before triggering team creation, preventing potential UI state issues.
apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx (2)
24-24
: LGTM! Consistent addition of createTeam callback to component props.
68-68
: LGTM! Proper callback propagation in both desktop and mobile UI.The createTeam callback is consistently passed to both UI variants, maintaining feature parity across desktop and mobile experiences.
Also applies to: 122-122
apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx (2)
32-32
: LGTM! Consistent addition of createTeam callback to component interface.
79-79
: LGTM! Proper callback propagation to selector components.The createTeam callback is correctly passed to both team-selection and project-selection focused popover buttons.
Also applies to: 107-107
apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx (3)
3-3
: LGTM: Clean import additionThe import statement correctly imports the createTeam action from the expected location.
11-11
: LGTM: Toast import added for error notificationsAdding the toast import from sonner aligns with the error handling pattern used in the createTeam function.
62-69
: LGTM: Well-implemented team creation with proper error handlingThe createTeam implementation follows good practices:
- Proper async/await usage
- Clear error handling with user-friendly toast messages
- Navigation to the new team page on success
- Consistent with the createTeam action's return type
The use of empty options
{}
is appropriate as the action provides sensible defaults for name and slug.apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx (2)
27-27
: LGTM: Clean prop addition for team creationThe createTeam callback prop is properly typed and follows the established pattern from other components in the codebase.
130-136
: LGTM: Create Team button properly activatedThe button implementation is correct:
- Removed the disabled state that was previously preventing interaction
- Added proper onClick handler that calls the createTeam prop
- Maintains consistent styling and icon usage
- The button text "Create Team" clearly indicates its purpose
This completes the integration that enables actual team creation functionality.
apps/dashboard/src/@/actions/deleteTeam.ts (1)
1-4
: LGTM: Proper server action setupThe file correctly uses the "use server" directive and imports the necessary dependencies for authentication and API configuration.
apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx (3)
3-3
: LGTM: Proper imports for team creation functionalityThe imports correctly bring in the necessary dependencies:
createTeam
action for API interactionuseDashboardRouter
for navigationtoast
from sonner for error notificationsThis aligns with the pattern established in other components.
Also applies to: 14-14, 18-18
31-31
: LGTM: Well-implemented team creation with navigationThe implementation is excellent:
- Proper use of the dashboard router hook
- Clean async function that wraps the createTeam action
- Consistent error handling with user-friendly toast messages
- Navigation to the new team page on success
- Follows the same pattern established in
AccountHeader.tsx
The function name
createTeamAndRedirect
clearly describes its behavior.Also applies to: 41-48
60-63
: LGTM: Create Team button properly activatedThe button transformation is well-executed:
- Removed the disabled state that was blocking user interaction
- Added proper onClick handler that calls the new
createTeamAndRedirect
function- Maintains consistent styling with the PlusIcon and responsive classes
- Clear and descriptive button text
This completes the user flow from a disabled placeholder to a fully functional team creation feature.
apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx (1)
68-75
: LGTM! Clean implementation with proper error handling.The
createTeam
function correctly handles both success and error cases. The error toast provides good user feedback, and the navigation logic properly redirects to the newly created team's page using the slug from the API response.apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx (3)
63-66
: Good improvement from hardcoded to dynamic permissions.The changes properly replace the hardcoded permission check with the actual
isOwnerAccount
prop and add the requiredteamId
for the delete operation. This enables real permission-based access control.
306-313
: Well-implemented delete mutation with proper error handling.The mutation correctly integrates with the
deleteTeam
action and handles the success case by redirecting to the teams overview page. The async/await pattern is appropriate for the server action call.
323-337
:❓ Verification inconclusive
Verify deleteTeam action handles all error scenarios properly.
The permission-based rendering works well, but ensure that the
deleteTeam
action properly handles edge cases like network failures, authorization errors, or cases where the team is referenced by other entities.
🏁 Script executed:
#!/bin/bash # Verify error handling in deleteTeam action and related components rg -A 10 -B 5 "deleteTeam.*throw\|deleteTeam.*error" --type=tsLength of output: 64
🏁 Script executed:
#!/bin/bash # Locate the definition of deleteTeamAndRedirect to inspect how errors are handled rg -nF "deleteTeamAndRedirect" -g '*.ts' -g '*.tsx'Length of output: 524
🏁 Script executed:
#!/bin/bash # Show context around deleteTeamAndRedirect definition to inspect error handling rg -n "const deleteTeamAndRedirect = useMutation" -g '*.tsx' -B5 -A15Length of output: 2946
🏁 Script executed:
#!/bin/bash # Show import statement for deleteTeam in the UI component rg -n "import.*deleteTeam" -g 'apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx'Length of output: 284
🏁 Script executed:
#!/bin/bash # Search across the repo for the import of deleteTeam rg -n "import .* deleteTeam" -g '*.ts' -g '*.tsx'Length of output: 206
🏁 Script executed:
#!/bin/bash # Locate and display the deleteTeam action implementation to inspect error handling rg -n "export (const|function) deleteTeam" -g '*.ts' -g '*.tsx' -B0 -A50Length of output: 74
Verify deleteTeam action handles all error scenarios properly.
I wasn’t able to locate the implementation of
deleteTeam
in@/actions/deleteTeam
, so please double-check that this function:
- Catches network failures and request timeouts
- Handles 401/403 authorization errors
- Deals with referential-integrity issues (e.g. team still referenced elsewhere)
- Propagates clear error messages back to
toast.promise
apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx
Outdated
Show resolved
Hide resolved
d649c61
to
3dd8fa8
Compare
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.
Actionable comments posted: 0
♻️ Duplicate comments (1)
apps/dashboard/src/@/actions/deleteTeam.ts (1)
6-15
: 🛠️ Refactor suggestionAdd input validation and explicit return type.
The authentication check is good, but there are still missing improvements from past reviews:
- Input validation: The
teamId
parameter lacks validation to ensure it's a non-empty string- Return type: Consider adding explicit return type annotation for better type safety
export async function deleteTeam(options: { teamId: string; -}) { +}): Promise< + | { status: "success" } + | { status: "error"; errorMessage: string } +> { const token = await getAuthToken(); if (!token) { return { status: "error", errorMessage: "You are not authorized to perform this action.", } as const; } + + if (!options.teamId?.trim()) { + return { + status: "error", + errorMessage: "Team ID is required.", + } as const; + }
🧹 Nitpick comments (1)
apps/dashboard/src/@/actions/deleteTeam.ts (1)
27-70
: Excellent error handling implementation!The comprehensive error handling addresses all the feedback from past reviews. The status code mapping, logging, and structured response objects are well implemented.
Minor consistency improvement - standardize error message punctuation:
case 401: { return { status: "error", - errorMessage: "You are not authorized to perform this action.", + errorMessage: "You are not authorized to perform this action", } as const; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
apps/dashboard/src/@/actions/createTeam.ts
(1 hunks)apps/dashboard/src/@/actions/deleteTeam.ts
(1 hunks)apps/dashboard/src/@/api/team.ts
(1 hunks)apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx
(2 hunks)apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx
(3 hunks)apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx
(5 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx
(3 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx
(1 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx
(4 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx
(2 hunks)apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
- apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.stories.tsx
- apps/dashboard/src/@/api/team.ts
- apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx
- apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.tsx
- apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamAndProjectSelectorPopoverButton.tsx
- apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectorMobileMenuButton.tsx
- apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/GeneralSettingsPage.stories.tsx
- apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx
- apps/dashboard/src/app/(app)/account/components/AccountHeaderUI.tsx
- apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamSelectionUI.tsx
- apps/dashboard/src/app/(app)/team/components/TeamHeader/team-header-logged-in.client.tsx
- apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/general/TeamGeneralSettingsPageUI.tsx
- apps/dashboard/src/@/actions/createTeam.ts
- apps/dashboard/src/app/(app)/account/overview/AccountTeamsUI.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/dashboard/src/@/actions/deleteTeam.ts (2)
apps/dashboard/src/app/(app)/api/lib/getAuthToken.ts (1)
getAuthToken
(6-14)apps/dashboard/src/@/constants/public-envs.ts (1)
NEXT_PUBLIC_THIRDWEB_API_HOST
(21-22)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: Build Packages
- GitHub Check: Unit Tests
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apps/dashboard/src/@/actions/deleteTeam.ts (2)
1-4
: LGTM! Proper server action setup.The server directives and imports are correctly implemented for a server action.
17-25
: LGTM! Proper API request implementation.The DELETE request setup is correctly implemented with proper authentication headers and endpoint construction.
3dd8fa8
to
a4a83af
Compare
a4a83af
to
67d04af
Compare
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.
✅ BugBot reviewed your changes and found no bugs!
Was this report helpful? Give feedback by reacting with 👍 or 👎
Merge activity
|
# [Dashboard] Feature: Add Team Creation and Deletion ## Notes for the reviewer This PR adds the ability for users to create and delete teams from the dashboard. It includes: 1. Server actions for creating and deleting teams 2. UI integration in the account header, team selector, and account teams page 3. Team deletion functionality in the team settings page ## How to test - Try creating a new team from the account header dropdown - Try creating a new team from the account teams page - Try deleting a team from the team settings page (only available for team owners) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enabled team creation directly from the account and team selection interfaces, allowing users to create a new team and be redirected to its page immediately. - Activated the "Create Team" button in relevant menus and headers, making team creation accessible across both desktop and mobile views. - **Bug Fixes** - Improved error handling and user feedback with toast notifications when team creation fails. - **Refactor** - Updated team deletion to use real permission checks and improved the user interface for deleting teams. - Added comprehensive handling of authorization and error messages for team creation and deletion operations. - Redirected users to the account page when no teams are available. - **Documentation** - Marked the default team retrieval function as deprecated in the documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on enhancing team management functionalities within the application. It introduces the ability to create and delete teams, updates various UI components to accommodate these changes, and ensures proper redirection and error handling during team operations. ### Detailed summary - Added `createTeam` function in `createTeam.ts` for team creation. - Introduced `deleteTeam` function in `deleteTeam.ts` for team deletion. - Updated UI components to include `createTeam` functionality. - Modified `TeamHeaderLoggedIn`, `AccountHeader`, and other components to handle team creation and deletion. - Implemented redirection upon successful team creation and deletion. - Updated `DeleteTeamCard` and `TeamGeneralSettingsPageUI` to manage permissions for team deletion. - Enhanced error handling and user feedback with toast notifications during team operations. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
67d04af
to
9643b8d
Compare
[Dashboard] Feature: Add Team Creation and Deletion
Notes for the reviewer
This PR adds the ability for users to create and delete teams from the dashboard. It includes:
How to test
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
PR-Codex overview
This PR primarily focuses on enhancing team management features by adding the ability to create and delete teams, updating related UI components, and ensuring proper redirection based on team availability.
Detailed summary
createTeam
function in multiple components.deleteTeam
functionality with error handling.DeleteTeamCard
to acceptcanDelete
andteamId
props.