Skip to content

Commit 0a9cbfb

Browse files
committed
Add prop to CredentialImage in order to hide the ribbon in fullscreen vc
1 parent badca9b commit 0a9cbfb

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/components/Credentials/CredentialImage.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { parseCredential } from "../../functions/parseCredential";
33
import StatusRibbon from '../../components/Credentials/StatusRibbon';
44

55

6-
export const CredentialImage = ({ credential, className, onClick }) => {
6+
export const CredentialImage = ({ credential, className, onClick, showRibbon = true }) => {
77
const [parsedCredential, setParsedCredential] = useState(null);
88

99
useEffect(() => {
@@ -14,10 +14,12 @@ export const CredentialImage = ({ credential, className, onClick }) => {
1414

1515
return (
1616
<>
17-
{parsedCredential &&(
17+
{parsedCredential && (
1818
<>
19-
<img src={parsedCredential.credentialBranding.image.url} alt={"Credential"} className={className} onClick={onClick} />
20-
<StatusRibbon credential={credential}/>
19+
<img src={parsedCredential.credentialBranding.image.url} alt={"Credential"} className={className} onClick={onClick} />
20+
{showRibbon &&
21+
<StatusRibbon credential={credential} />
22+
}
2123
</>
2224
)}
2325
</>

src/components/Popups/SelectCredentials.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ function SelectCredentials({ showPopup, setShowPopup, setSelectionMap, conforman
3636
);
3737

3838
setRequestedFields(conformantCredentialsMap[keys[currentIndex]].requestedFields);
39-
console.log('->',simplifiedCredentials);
4039
setImages(simplifiedCredentials);
4140
} catch (error) {
4241
console.error('Failed to fetch data', error);
@@ -83,7 +82,7 @@ function SelectCredentials({ showPopup, setShowPopup, setSelectionMap, conforman
8382
};
8483

8584
return (
86-
<div className="fixed inset-0 flex items-center justify-center z-40">
85+
<div className="fixed inset-0 flex items-center justify-center z-50">
8786
<div className="absolute inset-0 bg-black opacity-50"></div>
8887
<div className="bg-white p-4 rounded-lg shadow-lg w-full lg:max-w-[33.33%] sm:max-w-[66.67%] max-h-[90vh] z-10 relative m-4 overflow-y-auto">
8988
<h2 className="text-lg font-bold mb-2 text-custom-blue">

src/pages/Home/CredentialDetail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const CredentialDetail = () => {
111111
isOpen={showFullscreenImgPopup}
112112
onClose={() => setShowFullscreenImgPopup(false)}
113113
content={
114-
<CredentialImage credential={vcEntity.credential} className={"max-w-full max-h-full rounded-xl"} />
114+
<CredentialImage credential={vcEntity.credential} className={"max-w-full max-h-full rounded-xl"} showRibbon={false} />
115115
}
116116
/>
117117
)}

src/pages/Home/Home.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ const Home = () => {
213213
isOpen={showFullscreenImgPopup}
214214
onClose={() => setShowFullscreenImgPopup(false)}
215215
content={
216-
<CredentialImage credential={selectedVcEntity.credential} className={"max-w-full max-h-full rounded-xl"} />
216+
<CredentialImage credential={selectedVcEntity.credential} className={"max-w-full max-h-full rounded-xl"} showRibbon={false} />
217217
}
218218
/>
219219
)}

0 commit comments

Comments
 (0)