11'use client' ;
22
33import Image from 'next/image' ;
4+ import Link from 'next/link' ;
45import { useParams } from 'next/navigation' ;
56import { graphql } from '@/gql' ;
67import { TypeDataset , TypeUseCase } from '@/gql/generated/graphql' ;
@@ -29,12 +30,15 @@ const UseCasedetails: any = graphql(`
2930 user {
3031 fullName
3132 email
33+ id
3234 profilePicture {
3335 url
3436 }
3537 }
3638 organization {
3739 name
40+ slug
41+ id
3842 contactEmail
3943 logo {
4044 url
@@ -117,13 +121,15 @@ const UseCasedetails: any = graphql(`
117121 }
118122 supportingOrganizations {
119123 id
124+ slug
120125 name
121126 logo {
122127 url
123128 }
124129 }
125130 partnerOrganizations {
126131 id
132+ slug
127133 name
128134 logo {
129135 url
@@ -281,18 +287,20 @@ const UseCaseDetailClient = () => {
281287 < div className = "mt-8 flex h-fit w-fit flex-wrap items-center justify-start gap-6 " >
282288 { UseCaseDetails ?. useCase ?. supportingOrganizations ?. map (
283289 ( org : any ) => (
284- < div
290+ < Link
291+ href = { `/publishers/organization/${ org . slug + '_' + org . id } ` }
285292 key = { org . id }
286- className = " rounded-4 bg-surfaceDefault p-4"
287293 >
288- < Image
289- src = { `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ org . logo ?. url } ` }
290- alt = { org . name }
291- width = { 140 }
292- height = { 100 }
293- className = " object-contain"
294- />
295- </ div >
294+ < div className = " rounded-4 bg-surfaceDefault p-4" >
295+ < Image
296+ src = { `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ org . logo ?. url } ` }
297+ alt = { org . name }
298+ width = { 140 }
299+ height = { 100 }
300+ className = " object-contain"
301+ />
302+ </ div >
303+ </ Link >
296304 )
297305 ) }
298306 </ div >
@@ -306,18 +314,20 @@ const UseCaseDetailClient = () => {
306314 < div className = "mt-8 flex h-fit w-fit flex-wrap items-center justify-start gap-6 " >
307315 { UseCaseDetails ?. useCase ?. partnerOrganizations ?. map (
308316 ( org : any ) => (
309- < div
317+ < Link
318+ href = { `/publishers/organization/${ org . slug + '_' + org . id } ` }
310319 key = { org . id }
311- className = " rounded-4 bg-surfaceDefault p-4"
312320 >
313- < Image
314- src = { `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ org . logo ?. url } ` }
315- alt = { org . name }
316- width = { 140 }
317- height = { 100 }
318- className = " object-contain"
319- />
320- </ div >
321+ < div className = " rounded-4 bg-surfaceDefault p-4" >
322+ < Image
323+ src = { `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ org . logo ?. url } ` }
324+ alt = { org . name }
325+ width = { 140 }
326+ height = { 100 }
327+ className = " object-contain"
328+ />
329+ </ div >
330+ </ Link >
321331 )
322332 ) }
323333 </ div >
@@ -338,18 +348,23 @@ const UseCaseDetailClient = () => {
338348 < div className = "mt-8 flex flex-wrap items-center justify-start gap-8" >
339349 { UseCaseDetails ?. useCase ?. contributors ?. map (
340350 ( contributor : any ) => (
341- < Image
342- alt = { contributor . fullName }
343- width = { 120 }
344- height = { 120 }
345- className = "rounded-full object-cover"
351+ < Link
352+ href = { `/publishers/${ contributor . fullName + '_' + contributor . id } ` }
346353 key = { contributor . id }
347- src = {
348- contributor . profilePicture ?. url
349- ? `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ contributor . profilePicture ?. url } `
350- : '/profile.png'
351- }
352- />
354+ >
355+ < Image
356+ alt = { contributor . fullName }
357+ width = { 120 }
358+ height = { 120 }
359+ className = "rounded-full object-cover"
360+ key = { contributor . id }
361+ src = {
362+ contributor . profilePicture ?. url
363+ ? `${ process . env . NEXT_PUBLIC_BACKEND_URL } /${ contributor . profilePicture ?. url } `
364+ : '/profile.png'
365+ }
366+ />
367+ </ Link >
353368 )
354369 ) }
355370 </ div >
0 commit comments