File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src-ts/tools/learn/learn-lib/tca-certification-completed-modal Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,15 @@ const TCACertificationCompletedModal: FC<TCACertificationCompletedModalProps>
20
20
= useSessionStorage < boolean > ( storeKey , false )
21
21
22
22
function handleClick ( ) : void {
23
- props . onClose ( )
23
+ handleClose ( )
24
24
window . open ( getTCACertificateUrl ( props . certification . dashedName ) , '_blank' )
25
25
}
26
26
27
+ function handleClose ( ) : void {
28
+ setIsOpen ( false )
29
+ props . onClose ( )
30
+ }
31
+
27
32
useEffect ( ( ) => {
28
33
if ( ! storeKey || sessionStorage . getItem ( storeKey ) !== null ) {
29
34
return
@@ -34,7 +39,7 @@ const TCACertificationCompletedModal: FC<TCACertificationCompletedModalProps>
34
39
35
40
return (
36
41
< BaseModal
37
- onClose = { props . onClose }
42
+ onClose = { handleClose }
38
43
open = { isOpen }
39
44
size = 'sm'
40
45
classNames = { { modal : styles . completedModal , root : styles . modalRoot } }
You can’t perform that action at this time.
0 commit comments