Skip to content

Commit c8e0249

Browse files
committed
Use Nullable type
Signed-off-by: Gnanesh <[email protected]>
1 parent e747751 commit c8e0249

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import cx from 'classnames'
1414
import { FormikProps } from 'formik'
1515

1616
import { useDispatch } from 'react-redux'
17-
import { validateCertName, validateField } from 'uiSrc/utils'
17+
import { validateCertName, validateField, Nullable, truncateText } from 'uiSrc/utils'
1818
import PopoverDelete from 'uiSrc/pages/browser/components/popover-delete/PopoverDelete'
1919

2020
import {
@@ -40,7 +40,7 @@ export interface Props {
4040
const TlsDetails = (props: Props) => {
4141
const dispatch = useDispatch()
4242
const { flexGroupClassName = '', flexItemClassName = '', formik, caCertificates, certificates } = props
43-
const [activeCertId, setActiveCertId] = useState<string | null>(null)
43+
const [activeCertId, setActiveCertId] = useState<Nullable<string>>(null)
4444

4545
const handleDeleteCaCert = (id: string) => {
4646
dispatch(deleteCaCertificateAction(id, handleClickDeleteCert))
@@ -50,12 +50,11 @@ const TlsDetails = (props: Props) => {
5050
dispatch(deleteClientCertAction(id, handleClickDeleteCert))
5151
}
5252

53-
const handleClickDeleteCert = (id: string) => {
53+
const handleClickDeleteCert = () => {
5454
sendEventTelemetry({
5555
event: TelemetryEvent.CONFIG_DATABASES_CERTIFICATE_REMOVED,
5656
eventData: {},
5757
})
58-
showPopover(id)
5958
}
6059

6160
const closePopover = () => {

0 commit comments

Comments
 (0)