1
- import React , { useState , useContext } from 'react'
1
+ import React , { useState , useContext , useEffect } from 'react'
2
2
import Box from '@material-ui/core/Box'
3
3
import { Link } from 'react-router-dom'
4
4
import {
@@ -25,14 +25,12 @@ import { ThemeContext } from 'Context/theme/themeContext'
25
25
import applicationStyle from 'Routes/Apps/Gluu/styles/applicationstyle'
26
26
const DOC_CATEGORY = 'openid_client'
27
27
28
- function ClientCibaParUmaPanel ( { client, dispatch , scope, umaResources, scripts, formik } ) {
28
+ function ClientCibaParUmaPanel ( { client, scope, umaResources, scripts, formik } ) {
29
29
const { t } = useTranslation ( )
30
30
const theme = useContext ( ThemeContext )
31
31
const selectedTheme = theme . state . theme
32
32
const claim_uri_id = 'claim_uri_id'
33
-
34
33
const cibaDeliveryModes = [ 'poll' , 'push' , 'ping' ]
35
-
36
34
const claimRedirectURI = [ ]
37
35
38
36
scripts = scripts
@@ -42,9 +40,7 @@ function ClientCibaParUmaPanel({ client, dispatch, scope, umaResources, scripts,
42
40
function uriValidator ( uri ) {
43
41
return uri
44
42
}
45
-
46
- const [ softwareSection , setSoftwareSection ] = useState ( false )
47
- const [ cibaSection , setCibaSection ] = useState ( false )
43
+
48
44
const [ open , setOpen ] = useState ( false )
49
45
const [ selectedUMA , setSelectedUMA ] = useState ( )
50
46
const [ scopeExpression , setScopeExpression ] = useState ( )
@@ -58,15 +54,13 @@ function ClientCibaParUmaPanel({ client, dispatch, scope, umaResources, scripts,
58
54
if ( ! isEmpty ( uma ) ) {
59
55
setSelectedUMA ( uma )
60
56
setScopeExpression ( JSON . parse ( uma . scopeExpression ) ?. data )
61
- console . log ( 'uma' , uma )
62
- const getClientInum = uma ?. clients [ 0 ] . split ( ',' ) [ 0 ]
63
- const inum = getClientInum . split ( '=' ) [ 1 ]
64
- dispatch ( getScope ( inum ) )
65
57
}
66
58
67
59
setOpen ( true )
68
60
}
69
61
62
+ console . log ( 'scope' , scope )
63
+
70
64
return (
71
65
< Container >
72
66
< h2 > { t ( `titles.CIBA` ) } </ h2 >
@@ -186,7 +180,6 @@ function ClientCibaParUmaPanel({ client, dispatch, scope, umaResources, scripts,
186
180
</ ModalHeader >
187
181
< ModalBody >
188
182
< Card style = { applicationStyle . mainCard } >
189
- < h2 > UMA Resource Detail</ h2 >
190
183
< FormGroup row >
191
184
< GluuLabel label = { t ( 'fields.resourceId' ) } size = { 3 } />
192
185
< Col sm = { 9 } className = "top-5" >
@@ -286,7 +279,6 @@ const mapStateToProps = (state) => {
286
279
return {
287
280
clientData : state . oidcReducer . item ,
288
281
loading : state . oidcReducer . loading ,
289
- scope : state . scopeReducer . item ,
290
282
}
291
283
}
292
284
export default connect ( mapStateToProps ) ( ClientCibaParUmaPanel )
0 commit comments