@@ -8,7 +8,7 @@ import CredentialInfo from '../Credentials/CredentialInfo';
8
8
9
9
function SelectCredentials ( { showPopup, setShowPopup, setSelectionMap, conformantCredentialsMap, verifierDomainName } ) {
10
10
const api = useApi ( ) ;
11
- const [ images , setImages ] = useState ( [ ] ) ;
11
+ const [ vcEntities , setVcEntities ] = useState ( [ ] ) ;
12
12
const navigate = useNavigate ( ) ;
13
13
const { t } = useTranslation ( ) ;
14
14
@@ -29,13 +29,13 @@ function SelectCredentials({ showPopup, setShowPopup, setSelectionMap, conforman
29
29
30
30
try {
31
31
const response = await api . get ( '/storage/vc' ) ;
32
- const simplifiedCredentials = response . data . vc_list
32
+ const vcEntities = response . data . vc_list
33
33
. filter ( vcEntity =>
34
34
conformantCredentialsMap [ keys [ currentIndex ] ] . credentials . includes ( vcEntity . credentialIdentifier )
35
35
) ;
36
36
37
37
setRequestedFields ( conformantCredentialsMap [ keys [ currentIndex ] ] . requestedFields ) ;
38
- setImages ( simplifiedCredentials ) ;
38
+ setVcEntities ( vcEntities ) ;
39
39
} catch ( error ) {
40
40
console . error ( 'Failed to fetch data' , error ) ;
41
41
}
@@ -120,22 +120,22 @@ function SelectCredentials({ showPopup, setShowPopup, setSelectionMap, conforman
120
120
) }
121
121
122
122
< div className = 'flex flex-wrap justify-center flex overflow-y-auto max-h-[40vh] custom-scrollbar bg-gray-50 shadow-md rounded-xl' >
123
- { images . map ( image => (
123
+ { vcEntities . map ( vcEntity => (
124
124
< >
125
- < div key = { image . credentialIdentifier } className = "m-3 flex flex-col items-center" >
125
+ < div key = { vcEntity . credentialIdentifier } className = "m-3 flex flex-col items-center" >
126
126
< div className = "relative rounded-xl w-2/3 overflow-hidden transition-shadow shadow-md hover:shadow-xl cursor-pointer" >
127
- < CredentialImage key = { image . credentialIdentifier } credential = { image . credential } onClick = { ( ) => handleClick ( image . credentialIdentifier ) } className = { "w-full object-cover rounded-xl" } />
127
+ < CredentialImage key = { vcEntity . credentialIdentifier } credential = { vcEntity . credential } onClick = { ( ) => handleClick ( vcEntity . credentialIdentifier ) } className = { "w-full object-cover rounded-xl" } />
128
128
</ div >
129
129
< div className = 'w-2/3 mt-2' >
130
130
< button
131
- onClick = { ( ) => toggleCredentialDisplay ( image . credentialIdentifier ) }
131
+ onClick = { ( ) => toggleCredentialDisplay ( vcEntity . credentialIdentifier ) }
132
132
className = "text-xs py-2 w-full bg-custom-blue hover:bg-custom-blue-hover text-white font-medium rounded-lg" >
133
- { credentialDisplay [ image . credentialIdentifier ] ? 'Hide Details' : 'Show Details' }
133
+ { credentialDisplay [ vcEntity . credentialIdentifier ] ? 'Hide Details' : 'Show Details' }
134
134
</ button >
135
135
< div
136
- className = { `transition-all ease-in-out duration-1000 overflow-hidden shadow-md rounded-lg ${ credentialDisplay [ image . credentialIdentifier ] ? 'max-h-[500px] opacity-100' : 'max-h-0 opacity-0' } ` }
136
+ className = { `transition-all ease-in-out duration-1000 overflow-hidden shadow-md rounded-lg ${ credentialDisplay [ vcEntity . credentialIdentifier ] ? 'max-h-[500px] opacity-100' : 'max-h-0 opacity-0' } ` }
137
137
>
138
- < CredentialInfo credential = { image . credential } mainClassName = { "text-xs w-full" } />
138
+ < CredentialInfo credential = { vcEntity . credential } mainClassName = { "text-xs w-full" } />
139
139
</ div >
140
140
</ div >
141
141
</ div >
0 commit comments