@@ -105,7 +105,9 @@ export const BatchDeleteConfirmation: FC<BatchDeleteConfirmationProps> = ({
105105 < >
106106 { stage === "consequences" && < Consequences /> }
107107 { stage === "tasks" && < Tasks tasks = { checkedTasks } /> }
108- { stage === "resources" && < Resources workspaces = { workspaces } /> }
108+ { stage === "resources" && (
109+ < Resources tasks = { checkedTasks } workspaces = { workspaces } />
110+ ) }
109111 { resourceIconPreloads }
110112 </ >
111113 }
@@ -118,6 +120,7 @@ interface TasksStageProps {
118120}
119121
120122interface ResourcesStageProps {
123+ tasks : readonly Task [ ] ;
121124 workspaces : readonly Workspace [ ] ;
122125}
123126
@@ -227,7 +230,7 @@ const Tasks: FC<TasksStageProps> = ({ tasks }) => {
227230 ) ;
228231} ;
229232
230- const Resources : FC < ResourcesStageProps > = ( { workspaces } ) => {
233+ const Resources : FC < ResourcesStageProps > = ( { tasks , workspaces } ) => {
231234 const resources : Record < string , { count : number ; icon : string } > = { } ;
232235 for ( const workspace of workspaces ) {
233236 for ( const resource of workspace . latest_build . resources ) {
@@ -242,12 +245,10 @@ const Resources: FC<ResourcesStageProps> = ({ workspaces }) => {
242245 }
243246 }
244247
245- const workspaceCount = workspaces . length ;
246-
247248 return (
248249 < Stack >
249250 < p >
250- Deleting { workspaceCount === 1 ? "this task" : "these tasks" } will also
251+ Deleting { tasks . length === 1 ? "this task" : "these tasks" } will also
251252 permanently destroy…
252253 </ p >
253254 < Stack
@@ -259,7 +260,8 @@ const Resources: FC<ResourcesStageProps> = ({ workspaces }) => {
259260 < Stack direction = "row" alignItems = "center" spacing = { 1 } >
260261 < ServerIcon className = "size-icon-sm" />
261262 < span >
262- { workspaceCount } { workspaceCount === 1 ? "workspace" : "workspaces" }
263+ { workspaces . length } { " " }
264+ { workspaces . length === 1 ? "workspace" : "workspaces" }
263265 </ span >
264266 </ Stack >
265267 { Object . entries ( resources ) . map ( ( [ type , summary ] ) => (
0 commit comments