Skip to content

Commit 2021955

Browse files
committed
[dashboard] don't delete all workspaces on enter
1 parent aa60575 commit 2021955

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/dashboard/src/workspaces/WorkspaceEntry.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
135135
<Modal visible={isChangesModalVisible} onClose={() => setChangesModalVisible(false)}>
136136
{getChangesPopup(pendingChanges)}
137137
</Modal>
138-
<Modal visible={isModalVisible} onClose={() => setModalVisible(false)} onEnter={() => { model.deleteWorkspace(ws.id); return true; }}>
138+
{isModalVisible && <Modal visible={isModalVisible} onClose={() => setModalVisible(false)}>
139139
<div>
140140
<h3 className="pb-2">Delete Workspace</h3>
141141
<div className="border-t border-b border-gray-200 mt-2 -mx-6 px-6 py-2">
@@ -152,7 +152,7 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
152152
</button>
153153
</div>
154154
</div>
155-
</Modal>
155+
</Modal>}
156156
</div>;
157157
}
158158

0 commit comments

Comments
 (0)