Skip to content

Commit e41965b

Browse files
MichaelDeBoeySaraVieira
authored andcommitted
πŸ”¨ Switch DeleteSandboxModal to use useOvermind (#2524)
* πŸ”¨ Switch DeleteSandboxModal to use useOvermind * Fix types
1 parent 4ebdbab commit e41965b

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

β€Žpackages/app/src/app/pages/common/Modals/DeleteSandboxModal/index.jsβ€Ž

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import React, { FunctionComponent } from 'react';
2+
3+
import { Alert } from 'app/components/Alert';
4+
import { useOvermind } from 'app/overmind';
5+
6+
const DeleteSandboxModal: FunctionComponent = () => {
7+
const {
8+
actions: {
9+
modalClosed,
10+
workspace: { sandboxDeleted },
11+
},
12+
} = useOvermind();
13+
14+
return (
15+
<Alert
16+
title="Delete Sandbox"
17+
body="Are you sure you want to delete this sandbox?"
18+
onCancel={() => modalClosed()}
19+
onConfirm={() => sandboxDeleted()}
20+
/>
21+
);
22+
};
23+
24+
export default DeleteSandboxModal;

0 commit comments

Comments
Β (0)