Skip to content

Commit 1c18ee1

Browse files
authored
Merge pull request #2853 from MichaelDeBoey/overmind/EmptyTrash
🔨 Switch EmptyTrash to use useOvermind
2 parents 43d96d5 + f7f3153 commit 1c18ee1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

packages/app/src/app/pages/common/Modals/EmptyTrash/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1+
import React, { FunctionComponent } from 'react';
2+
13
import { Alert } from 'app/components/Alert';
24
import { useOvermind } from 'app/overmind';
3-
import React, { FunctionComponent } from 'react';
5+
46
import { permanentlyDeleteSandboxes } from '../../../Dashboard/queries';
57

6-
const EmptyTrash: FunctionComponent = () => {
8+
export const EmptyTrash: FunctionComponent = () => {
79
const {
10+
actions: { modalClosed },
811
state: {
912
dashboard: { trashSandboxIds },
1013
},
11-
actions: { modalClosed },
1214
} = useOvermind();
15+
1316
return (
1417
<Alert
15-
title="Empty Trash"
1618
body="Are you sure you want to permanently delete all the sandboxes in the trash?"
1719
onCancel={() => modalClosed()}
1820
onConfirm={async () => {
1921
await permanentlyDeleteSandboxes(trashSandboxIds);
22+
2023
modalClosed();
2124
}}
25+
title="Empty Trash"
2226
/>
2327
);
2428
};
25-
26-
export default EmptyTrash;

packages/app/src/app/pages/common/Modals/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import DeleteDeploymentModal from './DeleteDeploymentModal';
1313
import DeleteProfileSandboxModal from './DeleteProfileSandboxModal';
1414
import DeleteSandboxModal from './DeleteSandboxModal';
1515
import DeploymentModal from './DeploymentModal';
16-
import EmptyTrash from './EmptyTrash';
16+
import { EmptyTrash } from './EmptyTrash';
1717
import ExportGitHubModal from './ExportGitHubModal';
1818
import { FeedbackModal } from './FeedbackModal';
1919
import { ForkServerModal } from './ForkServerModal';

0 commit comments

Comments
 (0)