Skip to content

Commit 622795b

Browse files
committed
fix: update Datasets component to display correct profile images for individual datasets and organizations
1 parent acf1716 commit 622795b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

app/[locale]/(user)/components/Datasets.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ const Datasets = () => {
5252
const router = useRouter();
5353

5454
return (
55-
<div className=" container pt-10 lg:pt-20 md:px-8">
56-
<div className="flex flex-col gap-2 p-3 lg:p-0 md:p-0 ">
55+
<div className=" container pt-10 md:px-8 lg:pt-20">
56+
<div className="flex flex-col gap-2 p-3 md:p-0 lg:p-0 ">
5757
<Text variant="heading3xl">Recent Datasets</Text>
5858
<div className="flex flex-wrap justify-between gap-2 ">
5959
<Text variant="headingLg" fontWeight="medium">
@@ -117,7 +117,16 @@ const Datasets = () => {
117117
icon: `/Sectors/${item.sectors[0]}.svg`,
118118
label: 'Sectors',
119119
},
120-
{ icon: '/fallback.svg', label: 'Published by' },
120+
{
121+
icon: item.is_individual_dataset
122+
? item?.user?.profile_picture
123+
? `${process.env.NEXT_PUBLIC_BACKEND_URL}/${item.user.profile_picture}`
124+
: '/profile.png'
125+
: item?.organization?.logo
126+
? `${process.env.NEXT_PUBLIC_BACKEND_URL}/${item.organization.logo}`
127+
: '/org.png',
128+
label: 'Published by',
129+
},
121130
]}
122131
variation={'collapsed'}
123132
iconColor="warning"

0 commit comments

Comments
 (0)