1- "use client" ;
2-
3- import AlertCircle from "@/assets/icons/alert-circle.svg?react" ;
41import { CollapsibleCard } from "@/components/CollapsibleCard" ;
5- import { EmptyState } from "@/components/EmptyState" ;
62import { StackInfo } from "@/components/stacks/info" ;
73import { pipelineSnapshotQueries } from "@/data/pipeline-snapshots" ;
84import { useStack } from "@/data/stacks/stack-detail-query" ;
95import { Deployment } from "@/types/deployments" ;
106import { PipelineSnapshot } from "@/types/pipeline-snapshots" ;
117import { useQuery } from "@tanstack/react-query" ;
128import { Skeleton } from "@zenml-io/react-component-library" ;
9+ import { AlertEmptyState } from "./common" ;
1310import { DeploymentDetailWrapper } from "./fetch-wrapper" ;
1411
1512type DeploymentStackCollapsibleContentProps = {
@@ -49,7 +46,7 @@ function DeploymentStackCollapsibleWithSnapshot({ snapshotId }: { snapshotId: st
4946
5047 if ( snapshotQuery . isError ) {
5148 return (
52- < StackCollapsibleEmptyState
49+ < AlertEmptyState
5350 title = "Unable to get Stack"
5451 subtitle = "Something went wrong fetching the deployment snapshot"
5552 />
@@ -80,8 +77,8 @@ function DeploymentStackCollapsibleStackSection({
8077
8178 if ( stackQuery . isError ) {
8279 return (
83- < StackCollapsibleEmptyState
84- title = "Failed to fetch the stack "
80+ < AlertEmptyState
81+ title = "Unable to get Stack "
8582 subtitle = "Something went wrong fetching the stack"
8683 />
8784 ) ;
@@ -94,23 +91,9 @@ function DeploymentStackCollapsibleStackSection({
9491 return < StackInfo displayInfoBox = { false } stack = { stack } objectConfig = { snapshotConfig } /> ;
9592}
9693
97- function StackCollapsibleEmptyState ( { title, subtitle } : { title : string ; subtitle ?: string } ) {
98- return (
99- < EmptyState
100- className = "p-5"
101- icon = { < AlertCircle className = "h-[60px] w-[60px] fill-neutral-300" /> }
102- >
103- < div className = "text-center" >
104- < p className = "text-text-lg font-semibold" > { title } </ p >
105- { subtitle && < p className = "text-text-md text-theme-text-secondary" > { subtitle } </ p > }
106- </ div >
107- </ EmptyState >
108- ) ;
109- }
110-
11194function NoStackEmptyState ( ) {
11295 return (
113- < StackCollapsibleEmptyState
96+ < AlertEmptyState
11497 title = "No Stack"
11598 subtitle = "There is no stack associated with this deployment."
11699 />
0 commit comments