Refactor deployment components to unify application and compose handling

- Updated `CancelQueues`, `RefreshToken`, and `ShowDeployments` components to accept a unified `id` and `type` prop, allowing for streamlined handling of both applications and compose deployments.
- Removed redundant compose-specific components (`CancelQueuesCompose`, `RefreshTokenCompose`, `ShowDeploymentCompose`, and `ShowDeploymentsCompose`) to simplify the codebase.
- Enhanced loading state management in `ShowDeployments` to improve user experience during data fetching.
This commit is contained in:
Mauricio Siu
2025-05-04 12:39:17 -06:00
parent 27521decbd
commit 2fa0c7dfd2
9 changed files with 66 additions and 479 deletions

View File

@@ -320,7 +320,7 @@ const Service = (
</TabsContent>
<TabsContent value="deployments" className="w-full">
<div className="flex flex-col gap-4 pt-2.5">
<ShowDeployments applicationId={applicationId} />
<ShowDeployments id={applicationId} type="application" />
</div>
</TabsContent>
<TabsContent value="preview-deployments" className="w-full">

View File

@@ -1,5 +1,6 @@
import { ShowImport } from "@/components/dashboard/application/advanced/import/show-import";
import { ShowVolumes } from "@/components/dashboard/application/advanced/volumes/show-volumes";
import { ShowDeployments } from "@/components/dashboard/application/deployments/show-deployments";
import { ShowDomains } from "@/components/dashboard/application/domains/show-domains";
import { ShowEnvironment } from "@/components/dashboard/application/environment/show-enviroment";
import { ShowSchedules } from "@/components/dashboard/application/schedules/show-schedules";
@@ -333,7 +334,7 @@ const Service = (
<TabsContent value="deployments">
<div className="flex flex-col gap-4 pt-2.5">
<ShowDeploymentsCompose composeId={composeId} />
<ShowDeployments id={composeId} type="compose" />
</div>
</TabsContent>