@@ -15,7 +15,7 @@ import { useToast } from '@opengovsg/design-system-react'
1515import { DateTime } from 'luxon'
1616
1717import ConnectionContextMenu from '@/components/AppConnectionContextMenu'
18- import MenuAlertDialog , { AlertDialogType } from '@/components/MenuAlertDialog'
18+ import MenuAlertDialog from '@/components/MenuAlertDialog'
1919import { DELETE_CONNECTION } from '@/graphql/mutations/delete-connection'
2020import { TEST_CONNECTION } from '@/graphql/queries/test-connection'
2121import useFormatMessage from '@/hooks/useFormatMessage'
@@ -35,7 +35,6 @@ const countTranslation = (value: React.ReactNode) => (
3535
3636function AppConnectionRow ( props : AppConnectionRowProps ) : React . ReactElement {
3737 const toast = useToast ( )
38- const [ dialogType , setDialogType ] = useState < AlertDialogType > ( 'delete' ) // delete by default
3938 const [ verificationVisible , setVerificationVisible ] = useState ( false )
4039 const [ isVerified , setIsVerified ] = useState ( false )
4140 const [ testConnection , { called : testCalled , loading : testLoading } ] =
@@ -99,7 +98,6 @@ function AppConnectionRow(props: AppConnectionRowProps): React.ReactElement {
9998 action : { [ key : string ] : string } ,
10099 ) => {
101100 if ( action . type === 'delete' ) {
102- setDialogType ( 'delete' )
103101 onDialogOpen ( )
104102 } else if ( action . type === 'test' ) {
105103 setVerificationVisible ( true )
@@ -215,7 +213,7 @@ function AppConnectionRow(props: AppConnectionRowProps): React.ReactElement {
215213 cancelRef = { cancelRef }
216214 onDialogClose = { onDialogClose }
217215 dialogHeader = "Connection"
218- dialogType = { dialogType }
216+ dialogType = "delete"
219217 onClick = { onConnectionDelete }
220218 isLoading = { isDeletingConnection }
221219 />
0 commit comments