File tree Expand file tree Collapse file tree 2 files changed +26
-25
lines changed
packages/app/src/app/pages/common/Modals/EmptyTrash Expand file tree Collapse file tree 2 files changed +26
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import { Alert } from 'app/components/Alert' ;
2+ import { useOvermind } from 'app/overmind' ;
3+ import React , { FunctionComponent } from 'react' ;
4+ import { permanentlyDeleteSandboxes } from '../../../Dashboard/queries' ;
5+
6+ const EmptyTrash : FunctionComponent = ( ) => {
7+ const {
8+ state : {
9+ dashboard : { trashSandboxIds } ,
10+ } ,
11+ actions : { modalClosed } ,
12+ } = useOvermind ( ) ;
13+ return (
14+ < Alert
15+ title = "Empty Trash"
16+ body = "Are you sure you want to permanently delete all the sandboxes in the trash?"
17+ onCancel = { ( ) => modalClosed ( ) }
18+ onConfirm = { async ( ) => {
19+ await permanentlyDeleteSandboxes ( trashSandboxIds ) ;
20+ modalClosed ( ) ;
21+ } }
22+ />
23+ ) ;
24+ } ;
25+
26+ export default EmptyTrash ;
You can’t perform that action at this time.
0 commit comments