@@ -17,9 +17,9 @@ import {
1717import { cn , formatDate } from '@/lib/utils' ;
1818import BreadCrumbs from '@/components/BreadCrumbs' ;
1919import { Icons } from '@/components/icons' ;
20+ import { Loading } from '@/components/loading' ;
2021import Filter from '../datasets/components/FIlter/Filter' ;
2122import Styles from '../datasets/dataset.module.scss' ;
22- import { Loading } from '@/components/loading' ;
2323
2424// Interfaces
2525interface Bucket {
@@ -450,6 +450,14 @@ const ListingComponent: React.FC<ListingProps> = ({
450450 view = { view }
451451 >
452452 { datasetDetails . map ( ( item : any ) => {
453+ const image = item . is_individual_dataset
454+ ? item ?. user ?. profile_picture
455+ ? `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ item . user . profile_picture } `
456+ : '/profile.png'
457+ : item ?. organization ?. logo
458+ ? `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ item . organization . logo } `
459+ : '/org.png' ;
460+
453461 const commonProps = {
454462 title : item . title ,
455463 description : item . description ,
@@ -477,7 +485,7 @@ const ListingComponent: React.FC<ListingProps> = ({
477485 icon : `/Sectors/${ item . sectors [ 0 ] } .svg` ,
478486 label : 'Sectors' ,
479487 } ,
480- { icon : '/fallback.svg' , label : 'Published by' } ,
488+ { icon : image , label : 'Published by' } ,
481489 ] ,
482490 } ;
483491
@@ -495,7 +503,7 @@ const ListingComponent: React.FC<ListingProps> = ({
495503 } ) }
496504 </ GraphqlPagination >
497505 ) : (
498- < Loading />
506+ < Loading />
499507 ) }
500508 </ div >
501509 </ div >
0 commit comments