File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
app/[locale]/(user)/usecases/components Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { formatDate } from '@/lib/utils';
66import { Icons } from '@/components/icons' ;
77
88const Metadata = ( { data, setOpen } : { data : any ; setOpen ?: any } ) => {
9+
910 const metadata = [
1011 {
1112 label : 'Publisher' ,
@@ -70,10 +71,27 @@ const Metadata = ({ data, setOpen }: { data: any; setOpen?: any }) => {
7071 } ,
7172 {
7273 label : 'SDG Goals' ,
73- value :
74- data . useCase . metadata ?. find (
75- ( meta : any ) => meta . metadataItem ?. label === 'SDG Goal'
76- ) ?. value || 'N/A' ,
74+ value : (
75+ < div className = "flex flex-wrap gap-2" >
76+ { data . useCase . metadata . length > 0 ? (
77+ data . useCase . metadata
78+ ?. find ( ( meta : any ) => meta . metadataItem ?. label === 'SDG Goal' )
79+ ?. value . split ( ', ' )
80+ . map ( ( item : any , index : number ) => (
81+ < Image
82+ key = { index }
83+ src = { `/SDG/${ item } .png` }
84+ alt = { item || '' }
85+ width = { 60 }
86+ height = { 60 }
87+ className = "border-1 border-solid border-greyExtralight p-1"
88+ />
89+ ) )
90+ ) : (
91+ < span > N/A</ span >
92+ ) }
93+ </ div >
94+ ) ,
7795 } ,
7896 ] ;
7997
You can’t perform that action at this time.
0 commit comments