refactor: server actions to trpc#353
Draft
sarimrmalik wants to merge 4 commits into
Draft
Conversation
- Introduced `killSandbox` method in the `SandboxesRepository` to handle sandbox deletion. - Removed the deprecated `sandbox-actions.ts` file and migrated the kill action to the TRPC router. - Updated the `KillButton` component to use `useMutation` from React Query for improved state management and error handling. - Enhanced user feedback with toast notifications for success and error scenarios. This change streamlines the sandbox management process and aligns with the new API structure.
- Removed the deprecated `getUserAccessTokenAction` from user-actions. - Introduced a new `accountRouter` with a `getUserAccessToken` mutation to handle access token retrieval. - Updated the `UserAccessToken` component to use `useMutation` from React Query for improved state management and error handling. This change enhances the API structure and aligns with the new TRPC approach for user actions.
…or handling - Replaced the deprecated `getUsage` function with a TRPC call to `billing.getUsage` for fetching usage data. - Updated the `UsagePage` component to handle errors more gracefully, providing clearer error messages. - Removed the obsolete `get-usage.ts` file to streamline the codebase. This change aligns the usage data retrieval with the new TRPC architecture and improves the user experience during data loading failures.
…deprecated functions - Deleted the `getTeamMetrics` and `getTeamMetricsMax` functions in favor of TRPC calls. - Updated components to utilize the new TRPC structure for fetching team metrics. - Enhanced error handling in the UI to provide clearer feedback during data loading failures. This change aligns the metrics retrieval process with the new TRPC architecture, improving maintainability and user experience.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.