Skip to content

Commit a601f45

Browse files
committed
add sector logo in dataset details page
1 parent d9d76d4 commit a601f45

File tree

1 file changed

+17
-8
lines changed
  • app/[locale]/(user)/datasets/[datasetIdentifier]/components/Metadata

1 file changed

+17
-8
lines changed

app/[locale]/(user)/datasets/[datasetIdentifier]/components/Metadata/index.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,26 @@ const MetadataComponent: React.FC<MetadataProps> = ({ data, setOpen }) => {
125125
: data.organization.name}
126126
</Text>
127127
</div>
128-
<div className="flex items-center gap-2 ">
128+
<div className="flex gap-2 ">
129129
<Text className="min-w-[120px] basis-1/4 uppercase" variant="bodyMd">
130130
Sector
131131
</Text>
132-
<Text
133-
className="max-w-xs truncate "
134-
variant="bodyLg"
135-
fontWeight="medium"
136-
>
137-
{data.sectors[0].name}
138-
</Text>
132+
<div className="flex flex-wrap gap-2">
133+
{data.sectors.length > 0 ? (
134+
data.sectors.map((sector: any, index: number) => (
135+
<Image
136+
key={index}
137+
src={`/Sectors/${sector.name}.svg`}
138+
alt={sector.name || ''}
139+
width={52}
140+
height={52}
141+
className="border-1 border-solid border-greyExtralight p-1"
142+
/>
143+
))
144+
) : (
145+
<span>N/A</span>
146+
)}
147+
</div>
139148
</div>
140149
{Metadata.map((item: any, index: any) => (
141150
<div className="flex items-start gap-2 " key={index}>

0 commit comments

Comments
 (0)