@@ -18,7 +18,6 @@ import { Chip } from "@mui/material";
1818import SchoolIcon from "@mui/icons-material/School" ;
1919import DirectionsBoatIcon from "@mui/icons-material/DirectionsBoat" ;
2020import BadgeIcon from "@mui/icons-material/Badge" ;
21- import LogoBanner from "@/components/atoms/LogoBanner" ;
2221
2322
2423function Field ( { label, value } : { label : string ; value ?: string | null } ) {
@@ -155,35 +154,34 @@ export default async function ApplicationConfirmationPage({
155154 Verified Credentials:
156155 </ Typography >
157156 < Stack direction = "row" spacing = { 1 } flexWrap = "wrap" useFlexGap >
158- { verifiedCredentials . map ( ( cred ) => {
159- const isVerified = cred . status === "VERIFIED" ;
160- const isPending = cred . status === "PENDING" ;
161-
162- let icon = < BadgeIcon /> ;
163- let label = cred . credentialType ;
164-
165- if ( cred . credentialType === "PID" ) {
166- icon = < BadgeIcon /> ;
167- label = "PID (Person Identification)" ;
168- } else if ( cred . credentialType === "DIPLOMA" ) {
169- icon = < SchoolIcon /> ;
170- label = "Diploma" ;
171- } else if ( cred . credentialType === "SEAFARER" ) {
172- icon = < DirectionsBoatIcon /> ;
173- label = "Seafarer Certificate" ;
174- }
175-
176- return (
177- < Chip
178- key = { cred . id }
179- icon = { icon }
180- label = { label }
181- color = { isVerified ? "success" : isPending ? "warning" : "default" }
182- size = "small"
183- variant = "filled"
184- />
185- ) ;
186- } ) }
157+ { verifiedCredentials
158+ . filter ( ( cred ) => cred . status === "VERIFIED" )
159+ . map ( ( cred ) => {
160+ let icon = < BadgeIcon /> ;
161+ let label : string = cred . credentialType ;
162+
163+ if ( cred . credentialType === "PID" ) {
164+ icon = < BadgeIcon /> ;
165+ label = "PID (Person Identification)" ;
166+ } else if ( cred . credentialType === "DIPLOMA" ) {
167+ icon = < SchoolIcon /> ;
168+ label = "Diploma" ;
169+ } else if ( cred . credentialType === "SEAFARER" ) {
170+ icon = < DirectionsBoatIcon /> ;
171+ label = "Seafarer Certificate" ;
172+ }
173+
174+ return (
175+ < Chip
176+ key = { cred . id }
177+ icon = { icon }
178+ label = { label }
179+ color = "success"
180+ size = "small"
181+ variant = "filled"
182+ />
183+ ) ;
184+ } ) }
187185 </ Stack >
188186 </ Grid >
189187 </ Box >
0 commit comments